compact embedding of $H_0^1(\mathbb{R},\mathbb{C})$ into $L_2(\mathbb{R},\mathbb{C})$. [duplicate]
The Rellich-Kondrachov Compactness Theorem says that when $U$ is a bounded set with $C^1$ boundary then $W^{1,p}(U)$ is compactly embedded into $L^{q}(U)$ for every $1 \leq q < p^{*}$.
What if $U$ is unbounded, e.g. $U=\mathbb{R}^n$?
As Jake pointed out, the embedding fails in $\mathbb{R}^{n}$ because we can find a sequence of bumps bounded in $W^{1,p}(\mathbb{R}^{n})$ that go to infinity.
However, it turns out that there are unbounded domains $U$ with $W^{1,p}(U)\subset \subset L^{p}(\Omega)$ - you can find some of them in the book Sobolev Spaces by Adams.
In the more specific case of $W^{1,p}_{0}(U)$ for example, there are a few nice geometric conditions we can impose on unbounded $U$ so that the embedding is compact.
A necessary one is the following: $U$ must not contain infinitely many disjoint $\epsilon$-balls - otherwise, choose a sequence of bumps in those balls and apply the same argument as in $\mathbb{R}^{n}$ to contradict compactness.
Actually, in $n=1$ dimension, this is even sufficient and there is a nice elementary proof using only the fundamental theorem of calculus.
In higher dimensions, we need $U$ to be "sufficiently thin as we approach infinity" - what exactly that means you can read about in the book mentioned above.
Take a bump function $ f $ with compact support. Define $ f_n $ to be a translation of $f$ in some direction, say along the first coordinate axis. These clearly don't have a limit in $ L^q $.