What does it mean by "rank" in this context? If you have a function ${\phi : M \to N}$ ($M$, $N$ are smooth manifolds), what does the rank of ${\phi}$ mean? The lecture notes I have say it is the rank of ${\varphi' \circ \phi \circ \varphi^{-1} : \mathbb{R}^n\to \mathbb{R}^m}$ (${\varphi,\varphi'}$ are charts), but I'm still not sure what that means?
 A: That's an abuse of language.

Definition 1.
Let $M,N$ be smooth manifolds, $\phi:M\to N$ a smooth map. We (by slight abuse/overload of language) define the rank of $\phi$ at a point $p\in M$ to mean the rank of the tangent mapping $T\phi_p:T_pM\to T_{\phi(p)}N$ (here I'm using rank in the strict linear algebra sense; the dimension of the image). So,
\begin{align}
\text{rank}(\phi,p):= \text{rank}(T\phi_p):=\dim \text{image}(T\phi_p).
\end{align}

Ok this terminology isn't so abusive (though I still am not a fan) because if $M,N$ are vector spaces and $\phi$ was a linear transformation, then the tangent mapping can be canonically identified with $\phi$ itself and tangent spaces of vector spaces are canonically isomorphic to the vector space itself, so the rank of the tangent mapping coincides with the rank of $\phi$ as a linear transformation.
Another common way of defining it is

Definition 2.
Let $M,N$ be smooth manifolds, $\phi:M\to N$ a smooth map and $p\in M$ a given point. We define the rank of $\phi$ at $p$ by choosing charts $(U,\alpha)$ about $p$ in $M$, $(V,\beta)$ about $\phi(p)$ in $N$ and setting
\begin{align}
\text{rank}(\phi,p):=\text{rank } D(\beta\circ \phi\circ \alpha^{-1})_{\alpha(p)}
\tag{$*$}
\end{align}
Here, $Df_x$ means the usual (Frechet) derivative of a mapping $f$ between open subsets of Banach spaces (in our case between open subsets of $\Bbb{R}^{\dim M}$ and $\Bbb{R}^{\dim N}$).
One can show  is well-defined because if we take different charts $(U_1,\alpha_1)$ and $(V_1,\beta_1)$ then
\begin{align}
D(\beta_1\circ \phi\circ \alpha_1^{-1})_{\alpha_1(p)}&= D\bigg((\beta_1\circ \beta^{-1})\circ (\beta\circ \phi\circ \alpha^{-1})\circ (\alpha\circ \alpha_1^{-1})\bigg)_{\alpha_1(p)}\\
&=D(\beta_1\circ \beta^{-1})_{\beta(\phi(p))}\circ D(\beta\circ \phi\circ\alpha^{-1})_{\alpha(p)}\circ D(\alpha\circ \alpha_1^{-1})_{\alpha_1(p)}
\end{align}
Since $\beta_1\circ \beta^{-1}$ and $\alpha\circ\alpha_1^{-1}$ are chart transition maps, they are by  assumption diffeomorphisms between open subsets of some $\Bbb{R}^n$, hence their derivatives at any point are linear isomorphisms. So, in the above equation, we're composing on the left and right by linear isomorphisms, hence $D(\beta_1\circ\phi\circ \alpha_1^{-1})_{\alpha_1(p)}$ and $D(\beta\circ \phi\circ \alpha^{-1})_{\alpha(p)}$ have the same rank, so the rank of $\phi$ according to $(*)$ is indeed well-defined (i.e chart-independent).

Some authors may opt to present definition $2$ first if they haven't already introduced the notion of tangent spaces/bundles, though I think definition $1$ is cleaner. The equivalence of definitions (1) and (2) is also immediate once we realize that given a chart $(U,\alpha)$ about the point $p\in M$, one gets (in a straightforward way) a linear isomorphism $F_{\alpha,p}:T_pM\to\Bbb{R}^{\dim M}$ (whose precise definition depends on the definition of tangent space you work with), and likewise on the target manifold, and that the diagram below commutes
$\require{AMScd}$
\begin{CD}
T_pM @>{T\phi_p}>> T_{\phi(p)}N \\
@V{F_{\alpha,p}}VV @VV{F_{\beta, \phi(p)}}V \\
\Bbb{R}^{\dim M} @>>{D(\beta\circ \phi\circ \alpha^{-1})_{\alpha(p)}}> \Bbb{R}^{\dim N}
\end{CD}
For example, if you define tangent spaces as equivalence classes of smooth curves, then the mapping $F_{\alpha,p}:T_pM\to \Bbb{R}^{\dim M}$ is given by $[\gamma]\mapsto (\alpha\circ \gamma)'(0)$, i.e take an equivalence class and map it to the velocity vector of the chart-representative curve. This is well-defined due to the definition of the equivalence relation. For completeness, its inverse is $F_{\alpha,p}^{-1}(v)= [t\mapsto \alpha^{-1}(\alpha(p)+tv)]$ (in fact one defines the vector space structure of $T_pM$ by requiring that the bijection $F_{\alpha,p}$ be a linear isomorphism... and of course checking that this definition is chart-independent). From here, showing the diagram commutes is a matter of unwinding definitions.
