It returns the remainder after a division. So:
4%2 = 0 (since 4/2 = 2 with no remainder)
3%2 = 5 (since 3/2 = 1.5)
Many times this is used in figuring out alternating row colors. A counter starts at 1, then increments on each loop through a while() or for() or foreach() loop. On each itteration, the modulus operator is used to see if it's an "odd" row (i.e. divisible by 2 or not). Something like:
$i=1;
while($row = mysql_fetch_assoc($result))
{
// Do we need a specific BG color?
if($i%2 != 0)
$bgcolor = '#fff';
else
$bgcolor = '#abd';
// Do something with the database result
$i++;
}
However, that's not its only use. I'm sure there are thousands of ways you can use the operator. But as it states in the manual, it will return the remainder of a division operation (like above).
PHP Manual :: Arithmetic Operators