With the help of this sensor your phone will always able to tell you that which way is east or which is south or any other direction. This works on an inbuilt device known as a magnetometer. Works as a helpful device while using maps.
This sensor detects its nearby objects even if no physical contact is done with it. In Smartphones it is only used in touchscreen phones in order to auto lock the Smartphone screen while making calls or while receiving a call. Many other uses are also there like providing screen lock to Smartphone when kept in the pocket to avoid accidental launch of any application.
Ambient Light Sensor
A light sensor in front of almost all high-end Smartphones is used for adjusting brightness levels of display automatically. When your Smartphone is exposed to sunlight the brightness will automatically increase and when you move to a low light area your brightness comes to a normal mode and in a dark area brightness comes to its lowest possible point. It helps in battery saving by this action.
CMOS and CCD
These both are camera sensors. They convert the captured light into electric signals. There are no major differences between these two but CMOS is more used because of its low cost a less energy efficient than CCD.
The barometer is actually a device used to measure atmospheric pressure. But in case of Smartphone it is not for that purpose, here it is kept to help GPS to get location easily without the help of the data connection.
NOTE: - Though the article was written with full care and apt for this point of time, but as the technology keep on developing you are advised to ask an expert about the functions of sensors with the change of time.