Proximity Sensor
A device that senses when another object is close by.
In a mobile phone, a proximity sensor is most commonly used to detect when the phone is held to the face. Specifically, the sensor detects an area of skin of a certain size, within a certain distance in front of the speaker area at the top of the phone.
The phone uses this information to temporarily power down the display - to save battery life - and the touch screen, to prevent the face from accidentally touching on-screen buttons and triggering unwanted actions.
There are multiple types of proximity sensors, employing different technology. One type projects an invisible beam of infrared light and measures the beam's reflection from nearby surfaces. Another type uses capacitive technology (like touch-screens) that uses an electric field to detect the unique electrical properties of human skin.
Some types of proximity sensors detect any type of solid object, while other types are tuned specifically for one material, such as human skin.