Here's an article about modular arithmetic: http://en.wikipedia.org/wiki/Modular_arithmetic

You can also think of it in terms of remainders. For example,

5 = 2 mod 3 because 5/3=1 remainder 2.