Incredibly, I haven't been able to find a good entry online comparing these two mathematical structures. Their relative familiarity doesn't make their boundaries less fuzzy. Here is a coarse attempt:
From Wikipedia,
In mathematics, a function is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output.
A homomorphism is a structure-preserving map between two algebraic structures of the same type (such as two groups, two rings, or two vector spaces).
Based solely on these definitions it would seem that:
A function is injective (?) - this sounds incorrect. Yet, from general use, it would seem that both functions and homomorphisms can be injective or surjective, bijective, or neither.
Functions seem more limited in their algebraic structure, while the maps in homomorphisms can be defined more broadly.
Homomorphisms seem to encompass relations between a broader range of algebraic structures.
The property of homomorphisms $\varphi(a\circ b)=\varphi(a)\circ\varphi(b)$ is not necessarily a characteristic of functions.
Ok this is a tough topic (for me) so if I quote/mention/state something wrongly please comment and (if I can) I will edit my answer.
Functions are a relation (trying to be a bit informal) sending everything in domain uniquely to something in range. Except the bolded words, there are no other hidden criteria.
Homomorphism is something trickier. Firstly, we will not say "it is a homomorphism" without any context. It will not even make sense to say so. For example, we may say "$\varphi$ is a group homomorphism" (and later on in courses we take, we will omit the word to save us from troubles writing the word).
Homomorphism is something defined to "preserve" the structure of that thing (object) that we are describing. For example, in group, we requires $f(a+b)=f(a)+f(b)$ since we want the addition structure to be "sent" by the homomorphism. Note that in fact we also need $f(0)=0$ as an axiom of group homomorphism, but we got luck that $f(a+b)=f(a)+f(b)$ automatically implies $f(0)=0$ so we are good.
For vector space, homomorphism needs to respect addition $f(a+b)=f(a)+f(b)$ and multiplication by field elements $f(\lambda a)=\lambda f(a)$. Also, we need $f(0)=0$ and $f(1\cdot a)=1\cdot f(a)$ but they are both automatic.
For fields, homomorphism needs to respect addition $f(a+b)=f(a)+f(b)$, multiplication $f(ab)=f(a)f(b)$, $f(0)=0$ (automatic) and $f(1)=1$.
I cannot list examples forever (I mean there are still many objects in mathematics) but we can summarise that homomorphism is something that preserve certain structure for the category of objects.
I deliberately use the italicised words since it is tightly related to a subject called "Category theory". It is certainly not advisory for beginners (like me) to read deeply in that theory since examples are not enough to support ideas presented inside. However, I guess it can answer your question (to certain extent) to satisfy our curiosity.