$$H=\{g\in G \mid |g| \text{ divides }12\}$$
We have to prove that $H$ is a subgroup of $G$.
Consider $a\in G$ and, the group $\langle a \rangle$ where $|a|=12$. This group will contain elements orders of which will be divide 12. This is a cyclic subgroup I think this should be equal to H but I am not sure as I don't know if G is finite.
Hint: We can rewrite $H=\{g\in G\mid 12g=0\}$. Therefore, if you can show that the map $g\mapsto 12g$ is a homomorphism, then you have that $H$ is the kernel of a homomorphism and therefore a subgroup.