If we pick a regular value $J_0$ of $J$, then the level set, i.e. the set of points where $J=J_0$ is a submanifold invariant under the Hamiltonian flow of $J$. If the set of flow lines are parameterized by a smooth manifold of dimension one less than the dimension of the level set, then $H$ descends down to a Hamiltonian of a Hamiltonian system on that smooth manifold, for a natural symplectic structure. Simplest example: if $J=p_n$ in Darboux coordinates, i.e. $H$ is independent of $q_n$, then we can use coordinates $q_1,\dots,q_{n-1},p_1,\dots,p_{n-1}$ for that quotient manifold.