A proximity sensor is a sensor which is able to detect nearby objects with the help of emitting electromagnetic field or a beam of electromagnetic radiations without any physical contact.
It is commonly used on mobile devices to detect if someone is in nominal range. In smartphones an IR-based proximity sensor is used to detect the presence of a human ear. Once the user places his smartphone near ear, the display turns off resulting in low power consumption. Proximity sensor can also be used recognise air gestures and hover-manipulations.
There are four types of Proximity sensor:
1. Inductive Proximity Sensor
2. Capacitive Proximity Sensor
3. Ultrasonic Proximity Sensor
4. Optical Proximity Sensor
All the above types are explained in the slideshow given below:
Better explanation about sensors and its types