One way to crack this is to notice that the problem as stated isn't symmetrical: $x,y,z$ enter symmetrically into the hypothesis $x+y+z=0$, and they enter symmetrically under cyclic permutations into the LHS of the conclusion $(x-y)(y-z)(z-x)$, but they enter asymmetrically into the RHS of the conclusion. This is suspicious, and deserves scrutiny. See, if the conclusion really does follow from the hypothesis, then you could replace $x,y,z$ with $y,z,x$; then the hypothesis would still hold, and the conclusion would be
$$ (x-y)(y-z)(z-x) \equiv y-z \pmod 3 $$
which has the same LHS as the original conclusion but a different RHS. But this would mean that $x-y\equiv y-z\pmod 3$. Likewise, by replacing $x,y,z$ with $z,x,y$, we get that $x-y\equiv y-z\equiv z-x \pmod 3$.
So, if the statement is right, then it follows that $x-y\equiv y-z\equiv z-x \pmod 3$. A natural problem-solving maneuver at this point is to try to prove that secondary conclusion directly from the hypothesis, because maybe it's easier and maybe you'll notice something useful while you're doing it. Once you've done that, then you realize that you've reduced the original goal to proving that $(x-y)^3\equiv x-y\pmod 3$, and either you remember Fermat's Little Theorem or you check by brute force that $a^3\equiv a \pmod 3$.
The resulting proof is what appears in the other answers.