Emersion and Embedding on a Differential Manifold
Definition1
Let us consider $M^{m}, N^{m}$ as an $m, n$-dimensional differentiable manifold, and $\phi : M \to N$ as a differentiable function.
If the derivative $d\phi_{p}$ is a one-to-one function at every point $p \in M$, then $\phi$ is called an immersion.
If $\phi$ is both an immersion and a homeomorphic, then $\phi$ is called an embedding.
If the inclusion function $i : M \subset N$ is an embedding, then $M$ is called a submanifold of $N$.
Explanation
By definition, if $\phi : M^{m} \to N^{n}$ is an immersion then $m \le n$, and the difference between them, $n-m$, is the codimension of immersion $\phi$.
All immersions are locally embeddings.
Examples2
Not Differentiable
$$ \begin{align*} \alpha : \mathbb{R} &\to \mathbb{R}^{2} \\ t &\mapsto (t, \left| t \right|) \end{align*} $$
$\alpha$ is not differentiable at $t=0$.
Differentiable but Not an Immersion
$$ \begin{align*} \alpha : \mathbb{R} &\to \mathbb{R}^{2} \\ t &\mapsto (t^{3}, t^{2}) \end{align*} $$
$\alpha$ is differentiable at all points. However, calculating the derivative,
$$ d\alpha_{t} = \begin{bmatrix} 3t^{2} \\ 2t \end{bmatrix} $$
means that at $t=0$, $d\alpha_{0} =\begin{bmatrix} 0 \\ 0 \end{bmatrix}$. Therefore, since it’s not a one-to-one transformation, $\alpha$ is not an immersion.
Immersion but Not an Embedding1
$$ \begin{align*} \alpha : \mathbb{R} &\to \mathbb{R}^{2} \\ t &\mapsto (t^{3}-4t, t^{2}-4) \end{align*} $$
$\alpha$ is differentiable at all points, and $d\alpha_{t} = \begin{bmatrix} 3t^{2}-4 \\ 2t \end{bmatrix}$ does not equal $\begin{bmatrix} 0 \\ 0 \end{bmatrix}$ at any $t$, thus it is an immersion. However, since $\alpha (2)= (0,0) = \alpha (-2)$, $\alpha$ is not a homeomorphic. Therefore, $\alpha$ is not an embedding.
Immersion but Not an Embedding2
$$ \alpha : (-3,0) \to \mathbb{R}^{2} $$
$$ \alpha (t) = \begin{cases} (0, -(t+2)), & t \in (-3, -1) \\ \text{regular curve (see figure)}, & t \in (-1, -\frac{1}{\pi}) \\ (-t, \sin\frac{1}{t}), & t \in (-\frac{1}{\pi}, 0) \end{cases} $$
Here, $\alpha (-\frac{1}{\pi}, 0)$ is the graph of the topologist’s sine curve. The given $\alpha$ is an immersion. However, considering $\alpha^{-1}$, the coordinates on the $x$ axis oscillate rapidly as they get closer to $0$, so over some interval $\color{red}I$, it’s impossible to find an open set $U$. Therefore, $\alpha$ is not an embedding.
Embedding
Consider the surface $M$ of $\mathbb{R}^{3}$. Then the coordinate chart $\mathbf{x} : U \subset \mathbb{R}^{2} \to M$ is an embedding.