The sensors on most security lights are called passive infrared sensors. These sensors detect a specific type of energy: infrared energy. The infrared energy (or light) being emitted from the sensors bumps off of things and back to the sensor. These infrared beams might be likened to scouts, who then return (bounce back) to report. Why infrared energy? Because human beings themselves emit infrared energy--at a specific wavelength.
The sensors are covered by a lens, often a plastic lens that is bent so that the sensor has a wide field of vision. Since infrared energy is itself a kind of light, the plastic lens can bend or focus it, just as it could bend or focus light as we know it. On a typical security light, one sensor behind the lens will do, though some lights have two or more. Through the lens, the sensor emits its infrared rays and receives its infrared replies.
The Light Flips On
When a human being enters the scene, the infrared energy sent out by the sensor bounces off of the electrons surrounding the person and travel back to the sensor (all within a mere moment). Human infrared energy is typically nine to ten micrometers in wavelength, starkly different from the infrared energy that might be emitted by anything else in the room (like, for example, a heater). The sensor senses this rapid difference in infrared energy wavelength and the light flips on. Thus, it is the rapid change in infrared energy levels in specific space that triggers the sensors--not the mere presence of human infrared energy.