There is a definition in my lecture which I don't really understand:
Let $\overline{M}$ be a manifold and $M$ a submanifold. Now I'm "quoting" (+translating) the lecture notes:
Each vector field $X \in \mathfrak{X}(\overline{M})$ defines a vector field $X_{|M}$ along the inclusion $M \hookrightarrow \overline{M}$. Define $\overline{\mathfrak{X}}(M)$ as the $C^{\infty}(M)$ module of vector fields along the inclusion $M \hookrightarrow \overline{M}$. Also, it holds $\mathfrak{X}(M) \subset \overline{\mathfrak{X}}(M)$.
My interpretation: $X \in \mathfrak{X}(\overline{M})$ means that $X$ is a function $\overline{M} \rightarrow T\overline{M}$. Now $X_{|M}$ is then a function $M \rightarrow \bigcup\limits_{p \in M} T_p \overline{M}$ right? A vector field $X \in \mathfrak{X}(M) $ is a function $M \rightarrow TM$. Thus $TM \subset \bigcup\limits_{p \in M} T_p \overline{M}$, right? Now that's something I don't understand. Shouldn't it be $TM =\bigcup\limits_{p \in M} T_p \overline{M}$?
I'm not quite sure, if I understand what $\bigcup\limits_{p \in M} T_p \overline{M}$ means.
Sorry for my sometimes confusing explanations but maybe still somebody can explain this to me..
Could be too late, but I'm thinking about it.
For the inclusion case, we can see $X|_M$ as a vector field of $\bar{M}$ restricted to $M$. Note that $X|_M(p)$, in general, does not belong to $T_pM$, but always to $T_p\bar{M}$. So $$TM=\bigcup_{p\in M} T_pM \subsetneq \bigcup_{p \in M}T_p\bar{M}\subseteq \bigcup_{p\in\bar{M}}T_p\bar{M}=T\bar{M}.$$
Think about $\mathbb{S}^2\subset\mathbb{R}^3$, and $X=(x,y,z)\in\mathfrak{X}(\mathbb{R}^3)$. In that case, $X|_{\mathbb{S}^2}$ is a vector field along the inclusion but the vectors of this field are normal to the sphere, so they aren't tangent and $X|_{\mathbb{S}^2}\notin \mathfrak{X}(\mathbb{S}^2)$. For a geometric intuition of what $\bigcup_{p \in \mathbb{S}^2} T_p\mathbb{R}^3$ means, think it as the space of $$\{ (p,v) \in \mathbb{R}^3\times\mathbb{R}^3:p \in \mathbb{S}^2 \text{ and } v \in \mathbb{R}^3\}.$$ So, you kinda have an $\mathbb{R}^3$ attached to each point on the sphere, and not an $\mathbb{R}^2$ (tangent plane to be more precise) attached to each point, as $T\mathbb{S}^2$ suggests.
For the general case $f:\bar{M}\rightarrow \bar{N}$, a priori, we dont need to consider the restriction. In fact, if $Y \in \mathfrak{X}(\bar{N})$, it's not quite that $Y\circ f$ is defined on the image of $f$. The vector field $Y\circ f:\bar{M}\rightarrow T\bar{N}$ along $f$ is a function defined on $\bar{M}$ and not a vector field in $\bar{N}$ restricted to $f(\bar{M})$.