What is the infrared sensor of the Iphone 4s?

Read in the tech spec that from Iphone 4s ti 5s has equipped them with an infrared sensor.
What is means?
It detects when you're holding the phone up to your ear...
thanks
Welcome to iMore Kar

Some cases interfere with the sensor so avoid cheaply made ones


iMore Ambassador -iPhone 5s
Some screen protectors can cover that sensor as well and cause it to not function properly.
Only first quality cases for my 4s. My favourite is Speck Pixelskin HD

Original thread: https://forums.imore.com/threads/what-is-the-infrared-sensor-of-the-iphone-4s.284878/