The difference is that a function shows the relationship between two or more variables and an equation shows the relationship between their two sides.
However functions are equations, it's just written differently. For example:
Both reprensent the same line and both have the same results for the same x value, but their are written in different forms.