Modern motion detectors actually detect the movement of heat. When a person or animal moves in front of a motion detector, the detector will sense the change in temperature and send a signal to turn on lights or sound an alarm.
Heat shows up in the infrared spectrum, which is why motion detectors are sometimes called IR (infrared) detectors. They're also called PIR (passive infrared) detectors because they don't send out a signal to detect motion.
Motion detectors have a milky plastic covering that is actually a lens called a Fresnel lens. This is the same type of lens used on lighthouses that focuses and amplifies the energy passing through it.
The passive infrared device is a small electronic component behind the lens that senses infrared energy. Heat creates a small voltage change in the PIR sensor, and a separate component measures the change in voltage.
If the voltage change is great enough, a signal is sent to sound an alarm or turn on lights.