How to prove a surjective homomorphism is an isomorphism

Where the function f is equal to the surjective homomorphism G → H

and G and H are non trivial groups

How would I go about proving that f is an isomorphism?