A function is a rule of assignment: for each possible input in the domain, the function yields an output in the codomain (subject to certain requirements, like yielding a unique output for any input, and so on). Some times you use algebraic expressions to describe this assignment, like $f(x)=x^2$. Other times you can use words, like "let $f$ be the squaring function". There isn't any significant difference between these two.
On the other hand, $y=x^2$ is an equation. It's a relation between the two variables $x$ and $y$, describing a certain set of pairs $x,y$. It describes a certain subset of the plane. This subset happens to be the graph of the function $f$ described above, but I don't think about it as a function first and foremost.
That being said, you know that classic illusion with a drawing that looks like a duck and a rabbit at the same time? That's can often be a good way to look at many mathematical things.
For instance, $y=x^2$ can simultaneously be an equation, a relation, a curve in the plane, and a function (and maybe more), all depending on context. And it can change from one sentence to the next. Or some times it's very important that the interpretation stays the same all the way through a text. Most of the time it is what you need it to be, and trying to categorize it as only one thing ahead of time will only make life as a mathematician harder in my opinion.