This is from the book Elementary Number Theory by Jones & Jones
Example 3.6
Let us prove that a(a+1)(2a+1) is divisible by 6 for every integer a
By taking least absolute residues mod(6) we see that $a \equiv 0,\pm1,\pm2 or 3$. If $a \equiv 0$ then $a(a+1)(2a+1) \equiv 0 \cdot 1 \cdot 1 \equiv 0$, if $a \equiv 1$, then $a(a+1)(2a+1) \equiv 1 \cdot 2 \cdot 3 = 6 \equiv 0$, and similar calculations (which you should try for yourself) show that $a(a+1)(2a+1) \equiv 0$ in the other 4 cases, so $6 \vert a(a+1)(2a+1)$ for all a.
I don't understand the proof at all starting with the first line - By taking least absolute residues mod(6) we see that $a \equiv 0,\pm1,\pm2 or 3$. - How does taking absolute residues mod(6) give $a \equiv 0,\pm1,\pm2 or 3$?