On the Use of the Topology on Tangent Bundles On learning about how to define smooth vector fields on a manifold $M$, I learned that one should first define a tangent bundle , $T(M)$,  as $\cup T_p(M)$ together with a topology(smooth structure). And then, a smooth vector field $X$ would be a smooth map from $M \rightarrow T(M)$ s.t. $\pi \circ X=id_M$ 
However, it is obvious that the use of the auxilary manifold $T(M)$ should not be confined to merely offering a good def. of "smooth" vector fields. Well, at least you would not be using the global topology of $T(M)$. (Since the checking of "smoothness" is done locally)
I am inclined to believe that the global topology of $T(M)$ may play a more important role in determining the properties of vectorfields on $M$. So here are my two questions: 


*

*Can you give an example where the global topology of $T(M)$ is used to control certain properties(possibly about vec. fields) on $M$?

*If the global topology on $T(M)$ is indeed important, how do we set about determining it?  I have only seen trivial examples where for $M=S^1 or \mathbb{R}^n$, $T(M)=M\times \mathbb{R}^n$. But surely, there are examples where $T(M)\neq M\times \mathbb{R}^n$. And how do we determine the topology in that case? 
 A: Of course the global topology of $T(M)$ is important. It controls, for example, the existence of globally-defined vector fields with certain properties. Conversely, the non-existence of certain vector fields tells us that the global topology of $T(M)$ is non-trivial.
Consider the sphere $S^2$. By the hairy ball theorem, there are no continuous vector fields $S^2 \to T(S^2)$ which are nowhere vanishing. But if $T(S^2) \cong S^2 \times \mathbb{R}^2$ then by choosing a continuous basis of the tangent space at each point, we could obtain a continuous nowhere-vanishing vector field $S^2 \to T(S^2)$ — a contradiction. So $T(S^2) \ncong S^2 \times \mathbb{R}^2$.
In the case of an embedded manifold $T(M)$ defined as the vanishing of some smooth function $F : \mathbb{R}^N \to \mathbb{R}^k$, it is easy to describe the tangent bundle as another embedded manifold $T(M)$: it is (diffeomorphic to) the submanifold
$$\{ (x, \vec{v}) \in \mathbb{R}^N \times \mathbb{R}^N : F(x) = 0, D_x F (\vec{v}) = 0 \}$$
where $D_x F : \mathbb{R}^N \to \mathbb{R}^k$ is the Jacobian matrix of $F$ evaluated at $x$. So, for example,
$$T(S^2) = \{ (x, y, z, u, v, w) \in \mathbb{R}^6 : x^2 + y^2 + z^2 = 1, 2 x u + 2 y v + 2 z w = 0 \}$$
It is an amusing exercise to show that
$$T(S^n) \cong \{ (z_0, \ldots, z_n) \in \mathbb{C}^{n+1} : {z_0}^2 + \cdots + {z_n}^2 = 1 \}$$
In other words, $T(S^n)$ has the structure of a complex manifold! 
But of course some work still has to be done. It is not at all obvious from this calculation that $T(S^3) \cong S^3 \times \mathbb{R}^3$, which is a consequence of the existence of a Lie group structure on $S^3$. (All Lie groups have trivial tangent bundle.) 
A: Let's consider the tangent bundle $T(S^2)$ of the $2$-dimensional sphere $S^2$. Note that $T(S^2)$ is not trivial bundle, i.e. $T(S^2)\not\simeq S^2\times\mathbb{R}^2$. 
To see this, let $X$ be a vector field of $T(S^2)$. Then, as you said, $X$ is a section of the tangent bundle $T(S^2)$, i.e. $X:S^2\rightarrow T(S^2)$ such that $\pi\circ X=id_{S^2}$. By Poincare-Hopf's theorem, $X$ must have a zero, i.e. there exists $p\in S^2$ such that $X(p)=0$. Therefore,  $T(S^2)\neq S^2\times\mathbb{R}^2$; otherwise, if $T(S^2)\simeq S^2\times\mathbb{R}^2$, then there would exist a non-vanishing vector field $X$. More precisely, if $\pi: S^2\rightarrow T(S^2)\simeq S^2\times\mathbb{R}^2$, $X(p)=(p,(1,0))$ where $p\in S^2$ and $(1,0)\in\mathbb{R}^2$ is a non-vanishing vector field. 
From the above example, we can see that the topology of  $T(S^2)$ (the property that $T(S^2)$ is non-trivial) gives property on the vector field.
Note added: See also Zhen Lin's answer. He beats me by one minute. 
A: Every manifold with trivial tangent bundle is orientable: this is immediate from the definition.
Hence every  non-orientable  manifold is an example of a manifold with non-trivial tangent bundle.
Easy examples are the Möbius band, the real projective plane $\mathbb P^2(\mathbb R)$ and the Klein bottle.
The point of view of orientability has the advantage that it is completely elementary and self-contained: no input from topology id s needed.  
(This is definitely not meant as a criticism of Paul's and Zhen's great answers which I have just upvoted: the theorems they allude to are quite interesting and should eventually be learned too)   
Edit Let me show you how easy it is to prove non-orientability!  
1) A useful remark
If $M$ is orientable and if $(U,x)$ and $(V,y)$ are two charts with connected domains $U,V$ , then the change of coordinates $\phi =y\circ x^{-1}: x(U\cap V) \to y(U\cap V)$ has a jacobian $Jac(\phi) =det (\frac {\partial y_i}{\partial x_j})$ which does not change sign on  $x(U\cap V)\subset \mathbb R^n$.
[This is remarkable because $U\cap V$ and $x(U\cap V)$  need not be connected even though $U$ and $V$ are]   
2) Application: $\mathbb P^2(\mathbb R)$ is not orientable
Consider the two charts $x :U\to \mathbb R^2:[1:v:w]\mapsto (v,w)$ and $y :V\to \mathbb R^2:[u:1:w]\mapsto (u,w)$ , where the domain $U$ (resp. $V$) is  the set of $[u:v:w]\in \mathbb P^2(\mathbb R)$ with $u\neq 0$ (resp. $v\neq 0$).
 The change of coordinates is the diffeomorphism
 $$\phi=y\circ x^{-1}: \mathbb R^*\times \mathbb R \to \mathbb R^*\times \mathbb R:(u,v)\mapsto  (\frac {1}{u},\frac {v}{u})$$
whose jacobian $(Jac (\phi))(u,v)= -\frac {1}{u^3}$ does change sign on its (disconnected!) domain $\mathbb R^*\times \mathbb R$.
Hence $\mathbb P^2(\mathbb R)$ is not orientable according to the useful remark above.
