Let $U\subset\mathbb{R}^{d}$ be an open subset. The space $H_{0}^{1}(U)$ is defined to be the closure of $C_{\text{c}}^{\infty}(U)$ (= compactly supported smooth functions on $\Omega$) in $H^{1}(U)$. In particular, I'm trying to understand the following theorem:
Theorem 6.56 (Existence of basis of Laplace eigenfunctions). Let $U$ be an open bounded subset of $\mathbb{R}^{d}$. Then there exists an orthonormal basis $\{f_{n}\}$ of $L_{2}(U)$ of functions in $H_{0}^{1}(U)$ which are smooth in $U$ and have $\Delta f_{n}=\lambda_{n}f_{n}$, with $\lambda_{n}<0$ for all $n>1$, and $\lambda_{n}\to\infty$ as $n\to\infty$.
This is a theorem from this link (page 197). In examples, the writers of this book act like the functions $f\in H_{0}^{1}(U)$ vanish on the boundary $\partial U$ of $U$, however, to me it looks like $f$ isn't even defined on $\partial U$. Intuively, I can see why functions in $C_{\text{c}}^{\infty}(U)$ should "vanish on $\partial U$", but what can we say about functions in the $H^{1}(U)$-closure of $C_{\text{c}}^{\infty}(U)$? I think that I do not understand what the elements of $H_{0}^{1}(U)$ look like. Any help would be greatly appreciated.
There is a notion of "traces", that is, boundary restrictions $u\to u\vert_{\partial U}$, of Sobolev functions $W^{1,p}(U)$ (cf. wikipedia). To be more precise, one may construct a linear continuous map $T\colon W^{1,p}(U) \to L^p(\partial U)$, which acts as $T(u) = u\vert_{\partial U}$ on $u \in C^1(\bar{U})$ (for this you will need some regularity of the boundary, say $C^1$). With the help of this so-called 'trace operator' you may characterize $W_0^{1,p}(U)$ as its kernel. In this sense, this space consists of the Sobolev functions that vanish on the boundary.