The IR sensor itself is housed in a hermetically sealed metal can to improve noise/temperature/humidity immunity. There is a window made of IR-transmissive material (typically coated silicon since that is very easy to come by) that protects the sensing element. Behind the window are the two balanced sensors.
PIR sensors in theory
Most passive motion detectors used in homes have passive infrared (PIR) sensors, Infrared sensors receive heat radiated from the human body. Segment lenses divide the detection zone into passive and active zones. This way, the highly sensitive sensors can detect persons or warm objects moving between the zones as a change in voltage. Even the smallest of movements are registered. The quality is governed by resolution (number of detection zones), design and the software.