Exact Definition of Graph Homomorphism

I don't know if I am asking a silly question, but what is the exact definition of a graph homomorphism (throughout, the graphs may be assumed to be simple, i.e. undirected, no loops, no multiple edges, etc)? I have a slight confusion with the existing definition, which says that a function f : V(G) to V(H) is called a graph homomorphism, if whenever (i,j) is an edge of G, (f(i),f(j)) is an edge of H. The confusion is that, suppose that f(i) = f(j), and suppose that (i,j) is an edge of G. Then, is f still a homomorphism? Or does a graph homomorphism necessarily have to be an injective function (in set-theoretic sense)? Please help me settle this issue, as it would be very embarassing to have his kind of a misconception at the beginning of my study of graph theory!