Let $H$ the Hamiltonian of a system and $\gamma $ an integral curve of the Hamiltonian vector field, i.e. if $\gamma (t)=(q(t),p(t))$ and $H(p,q)$ is the Hamiltonian, then $$\begin{cases} \dot p=-H_q\\ \dot q= H_p\end{cases}.$$
In wikipedia the say that $H$ is constant along $\gamma $. Why is this true ? i.e. why $H(\gamma (t))$ is constant ?