What is an equation, set-theoretically? In modern mathematics, everything is a set of some kind. For example, an ordered pair is a set, a binary operation is a more complicated set, a group is a yet more complicated set. But what about equations? How do you implement equations as a certain kind of set?
 A: Usually, equations are statements, not mathematical objects, so they do not need to be implemented as sets.  In the context of (say) ZFC, the symbol $=$ is part of the formal language of set theory, so equations are part of the language we use to talk about sets, rather than sets themselves.
In some contexts (such as universal algebra) it is useful to talk about things like sets of equations, so you need to encode equations as sets.  This is simple: an equation is just some finite string of symbols, so you encode each of the symbols which might appear in your equations as specific sets and then encode the whole equation as a finite sequence (i.e., a function whose domain is a natural number).
A: Avoiding complex foundational & meta-mathematical considerations.
In a language including K variables and symbols for constants, operations and equality, an equation is naturally interpreted as a K-relation. A K-relation is just an ordered K-set.
An equation can then be identified with its solutions over a domain, that is the set of the K-sets satisfying it.
The absence of solutions given a specific domain makes the relation equal to the empty set.
