In most books of mechanics, if we study a mechanical system on a Manifold $M$, an Hamiltonian is a function $$ H:TM\rightarrow \mathbb{R} $$ $$ (q,p) \mapsto H(q,p) $$
This I understand, if $M=\mathbb{R}^3$ then $TM=\mathbb{R}^3\times \mathbb{R}^3$ and $q$ the position is a vector of $\mathbb{R}^3$ and $p$ the momentum is a vector of $\mathbb{R}^3$.
However we can also find that $(q,p)$ are local coordinates on $T^\ast M$. I also understand this, in the sense that if $F$ is a vector field, then p acts on $F(q)$ : $p\cdot F(q)$, or also that the Hamiltonian lift of the vector field $F$ is $p\cdot F$.
What is right or wrong in a general sense ? Are these difference important ?