I have this idea: if I choose a small open set $U\subset M$ then we can consider $T^1U=U\times S^{n-1},$ where $n=\dim M.$ (This is the hint that my professor provided. I don't know why that's true).
Using this, for any $x\in M,$ we can choose $U_x$ a small open set containing $x,$ so we can write: \begin{eqnarray*} T^1M&=&\bigcup_{x\in M} T^1U_x =\bigcup_{x\in M} (U_x\times S^{n-1})=\left(\bigcup_{x\in M} U_x\right)\times S^{n-1}=M\times S^{n-1}. \end{eqnarray*}
Using this equality, I conclude that $T^1M$ is compact if and only if $M$ is compact. I'm not sure about this result. I also tried to prove it using coverings, but I'm still stuck. Any help?
$T^1M$ is not necessarily trivial. So you cannot say that $T^1M$ is isomorphic to $M\times S^{n-1}$. There exists a comapct subset $V_x\subset U_x$ whose interior $V_x^0$ is open. You can find finitely many $x_1,...,x_n$ such that $M=\cup_{x_i}V_{x_i}^0$. If $p:T^1M\rightarrow M$, $p^{-1}(V_x)\subset p^{-1}(U_x)=U_x\times S^{n-1}$. You deduce that $p^{-1}(V_x)=V_x\times S^{n-1}$. You have $T^1M=\cup^{i=n}_{i=1}p^{-1}(V_{x_i}^0)\subset \cup_{i=1}^{i=n}p^{-1}(V_{x_i})$. Since $p^{-1}(V_{x_i})=V_{x_i}\times S^{n-1}$ is compact, you deduce that $T^1M$ is compact since it is the union of compact subsets.