Consider an arbitrary element $g\in G$. $g$ induces the cyclic subgroup $C:=\\{g^n:n\in\mathbb Z\\}$. Since $C$ is nontrivial (unless $g$ is the neutral element), $H$ must, by definition, be a subgroup of $C$. But all elements of $C$ commute with $g$, by construction. Therefore since $H$ is a subgroup of $C$, all elements of $H$ also commute with $g$. But $g$ was chosen arbitrary, thus all elements of $H$ commute with _every_ element of $G$, thus $H$ is a subgroup of the center.