$$\gdef\Q{\mathbb Q} \gdef\P{\mathbb P} \gdef\RM{\backslash}$$
We will do some basic definitions of submanifolds. Then we talk about Whitney Embedding Theorem
(1) Let $M, N$ be two smooth manifolds. A smooth embedding of $M$ into $N$ is a smooth immersion $F: M \to N$ that is also a topological embedding, i.e., a homeomorphism onto its image $F(M) \subset N$ where $F(M)$ is equipped with the subspace topology.
Example and Non-example of smooth embeddings
Prop: if $F: M \to N$ is an injective smooth immersion, and $M$ is compact, then $F$ is a smooth embedding.
(2) A closely related terminology is an embedded submanifold. Let $M$ be a smooth manifold, an embedded submanifold $S$ is a subset $S \subset M$ such that
The codimension of $S$ in $M$ is $co\dim_M S = \dim M - \dim S$. An open subset of $M$ can be viewed as a codimension-0 submanifold, and is called an 'open submanifold' of $M$.
(3) Def: An embedded submanifold $S \subset M$ is properly embedded, if the inclusion $i: S \into M$ is a proper map.
Intuitively speaking, a properly embedded submanifold does not have “loose ends”.
Prop: An embedded submanifold $S \subset M$ is properly embedded if and only if $S$ is a closed subset of $M$.
(4) local $k$-slice. Let $S$ be an embedded submanifold of $M$, of dimension $k$. Then for any point $p \in S$, we can find a coordinate chart $(U, (x_1, \cdots, x_n))$ of $p$ in $M$, such that $S \cap U = \{q \in U: x_{k+1}(q) = \cdots = x_n(q) = 0\}$. Such a coordinate is called a slice coordinate.
For simplicity, I will only prove the compact version.
Theorem: Every smooth compact manifold of dimension $n$ admit a proper smooth embedding into $\R^{2n+1}$.
Let $M$ be a smooth compact manifold of dimension $n$.
Step 1: Show that one can embed $M$ into $\R^N$ for a large enough $N$. Let $M$ be covered by finitely many coordinate charts $\{(U_1,\varphi_i)\}_{i=1}^m$. Let $\{f_i\}$ be a partition of unity of $M$ subject to the cover $\{U_i\}$, i.e. $f_i \geq 0$, $\sum_i f_i = 1$ and $supp(f_i) \subset U_i$. We then define a map $$ \Phi: M \to \R^{nm + m} , \quad p \mapsto (\varphi_1(p) f_1(p), \cdots, \varphi_m(p) f_m(p); f_1(p), \cdots, f_m(p))$$ First, we note that $\Phi$ is well-defined and smooth, indeed $\varphi_i(p)f_i(p): U \to \R^n$ can be viewed as a function on $M$ by extension by zero. Next, we note that $\Phi$ is a smooth immersion. Suppose not, and $0 \neq v \in T_p M$ is in the kernel of $d\Phi_p$, then assume $f_j(p) \neq 0$, we would have $d f_j(p)(v) = 0$, then $d (\varphi_j \cdot f_j)(v) = f_j(p) d (\varphi_j)(v)$, since $d (\varphi_j)$ is a bijection, and $f_j(p) \neq 0$, we have $d (\varphi_j \cdot f_j)(v)\neq 0$, this contradicts with $d \Phi_p(v) = 0$. Hence $\Phi$ is a smooth immersion. Since $M$ is compact, we have $\Phi$ a proper embedding.
Step 2: Show that, if $\Phi: M \to \R^N$ is any smooth embedding, and if $N > 2n+1$, then we can find quotient map $\pi_v : \R^N \to \R^N / (\R \cdot v) \cong \R^{N-1}$, such that $\pi_v \circ \Phi: M \to \R^{N-1}$ is a smooth embedding.
Since $M$ is compact, hence smooth embedding corresponds to injective immersion. We identify $M$ as a embedded submanifold of $\R^N$. Let $[v] \in \R \P^{N-1}$ be the line containing $v$. Then
To show that such nice $v$ exists, we will consider all possible directions $[v] \in \R\P^{N-1}$, and use Sard theorem to say the bad directions are negligible. Let $\Delta_M \subset M \times M$ be the diagonal. And let $M \subset TM$ as the zero section. Then we have two maps $$ \kappa: (M \times M) \RM \Delta_M \to \R \P^{N-1}, \quad (p,q) \mapsto [p-q] $$ $$ \tau: TM \RM M \to \R \P^{N-1}, \quad (p, w) \mapsto [w] $$ For both map, the source manifold is $2n$-dimensional, and the target manifold is $N-1$ dimensional, by assumption $N-1 > 2n$, hence the image of $\kappa$ and $\tau$ are the singular value set, hence negligible.
Then, we can repeat this step iteratively, until $N = 2n+1$, then we are done. QED.