In many nocturnal animals, a reflective layer called the tapetum lucidum at the back of their eyes reflects light like a mirror, helping to enhance eyesight at low levels of illumination. This doesn’t exist in humans, so the flash from a camera hits the retina and is sometimes strong enough to cause a red glow, a result of light bouncing off the blood vessels at the back of the eye.
To counteract this effect, some cameras include a red-eye reduction mode. This works by triggering the flash twice in rapid succession: once for the actual photo and once just before. The first of the flashes will cause the pupils to contract, significantly reducing the amount of light entering the eye and, more often than not, eliminating red eye in the actual photo that quickly follows.