$\renewcommand\C{\mathbb C}\newcommand{\R}{\mathbb R}$To complement the [answer by Christian Remling][2], let us provide explicit examples of $u\in L^2(\R^n)$ such that $u*u$ is compactly supported but $u$ is not compactly supported. 

Consider first the case $n=1$. Let $w(x):=\frac12\,1(|x|<1)$ for real $x$. Then $w\in L^2(\R)$ and for the Fourier transform $\hat w$ of $w$ and all real $t\ne0$ we have 
\begin{equation*}
	\hat w(t)=\int_\R dx\, e^{itx} w(x)=\frac{\sin t}t, \tag{1}\label{1}
\end{equation*}
with $\hat w(0)=1$. Let now $v:=w*w$. Then $v$ is of course compactly supported, and 
\begin{equation*}
	\hat v=\hat w^2. 
\end{equation*}
Next, let $u$ be the inverse Fourier transform of $|\hat w|=\sqrt{\hat v}$, so that $u$ is the limit in $L^2(\R)$ as $A\to\infty$ of the functions $u_A$ defined by the formula 
\begin{equation*}
	u_A(x):=\frac1{2\pi}\,\int_{-A}^A dx e^{-itx} \frac{|\sin t|}{|t|}
	=\frac1{2\pi}\,\int_{-A}^A dx \cos tx\, \frac{|\sin t|}{|t|}  
\end{equation*}
for real $x$. 
Note that $u\in L^2(\R)$, since $\hat u=|\hat w|\in L^2(\R)$. (One may also note that the function $u$ is real-valued.) 

Also, $u*u=v$, since $\hat u^2=|\hat w|^2=\hat v$. So, $u*u$ is compactly supported. 

If the function $u$ were compactly supported, then, by the easy part of [Schwartz's Paley–Wiener theorem][1], the Fourier transform $\hat u=|\hat w|$ could be extended to an entire function -- which is impossible, because, in view of \eqref{1}, the function $|\hat w|$ is not smooth on $\R$. 

Thus, $w\in L^2(\R)$ and $u*u$ is compactly supported, but $u$ is not compactly supported. 

---

To get now, for any natural $n$, an explicit example of a function $U\in L^2(\R^n)$ such that $U*U$ is compactly supported but $U$ is not compactly supported, it is enough to tensorize the function $u$ from the "one-dimensional" example above: 
\begin{equation*}
	U(x):=u^{\otimes n}(x)=u(x_1)\cdots u(x_n)
\end{equation*}
for $x=(x_1,\dots,x_n)\in\R^n$. 
 
  [1]: https://en.wikipedia.org/wiki/Paley%E2%80%93Wiener_theorem#Schwartz's_Paley%E2%80%93Wiener_theorem
  [2]: https://mathoverflow.net/a/447181/36721