If m is an integer > 1, the numbers "mod m" are restricted from 0 to m-1 inclusive. (The variable m is often used, as it is the first letter in the word modulus.) If the sum of two numbers exceeds m-1, subtract m to bring the result back into the proper range. Similarly, if x-y is negative, add m back in. In general, the result of every mathematical operation is divided by m, and the remainder is used.
Verify that addition and multiplication remain commutative, associative, and distributive mod m. In other words, we can add up 100 numbers, then take the remainder mod m, or take remainders after each number is added; the result is the same. This also holds for multiplication, so nice ring-like properties, such as a+b = b+a, are inherited.