It's called a proximity sensor. It does indeed sense when the iPhone gets close to your face and shuts the screen off. This prevents you from accidentally hanging up on someone with your face. The other one is a light sensor that's suppose to dim the s…