There is (at least) two ways of seeing the tangent space of a manifold $M$ at a point $p$ :
- As an equivalence class of "velocity vectors". Consider two curves $\gamma_1, \gamma_2$ equivalents if $ \frac{d}{dt}\left(\varphi \circ \gamma_1 \right) \big|_{t=0} = \frac{d}{dt}\left(\varphi \circ \gamma_2 \right) \big|_{t=0}$ where $\varphi$ is a chart around $p$, and $\gamma_1(0) = \gamma_2(0) = p$.
- In an algebraic way. You define a vector at $p$ as a derivation, which is a linear map $X_p : \mathcal C^{\infty}(M) \to \mathbb R$ which satisfy Leibniz rule : $X_p(fg) = g(p)X_p(f) + f(p)X_p(g)$.
From the first definition, you can imagine the tangent space as all the space of " all possible velocity vectors at $p$" for a particle moving only in $M$ and passing by $p$.
The second definition is more abstract but the meaning is the same. What happened in $\mathbb R^n$ ? We can see that ponctual derivations are simply derivations of a fonction $f : \mathbb R^n \to \mathbb R$, i.e simply the application $ f \to \sum_k \lambda_k \frac{\partial f}{\partial x_k}$ which is exactly directionnal derivative along the vector $v = (\lambda_1, \dots, \lambda_n)$.
Now, an immersion is simply a smooth map $f : M \to N$ such that the tangent map $T_pf : T_pM \to T_{f(p)}N$ is injective. Since $\dim M = \dim T_pM$ for any smooth manifolds (it follows from the derivation viewpoint, since a basis for $T_pM$ is $(\frac{\partial }{\partial x_1}, \dots, \frac{\partial }{\partial x_1})$, it follows easily that $f$ is an immersion if for every $p$, $\text{rank} T_pf= \dim M $.
The link between $T_pM$ as derivation space and as equivalence class of curves is not immediate. I think a good book for this kind of questions is the excellent "Introduction to Smooth Manifolds" by Lee. Lot of details inside, and really clear writing.