I think the condition is that $H$ is a homomorphic image of $G$ iff there is an $N\trianglelefteq G$ such that $H\cong G/N$, but I don't know how to prove it.
I saw this question posted elsewhere here, but the answer wasn't complete/they finished explaining in chat so I'm a little lost. Here is the original question for reference:
Necessary and Sufficient Condition for cyclic $H$ to be a homomorphic image of cyclic $G$
What you're probably lacking is just some comfort with the isomorphism theorems. You need to know that if $G$ is a group and we have a homomorphism $f:G \to G'$ then $ker(f)$ is a normal subgroup of $G$ and that $G/ker(f) \cong Im(f)$
So if we have $f: G \to H$ where $f(G) = H$, then the isomorphism theorem tells us that $G/ker(f) \cong H$ and so there exists a normal subgroup $N = ker(f)$ such that $G/N \cong H$.