The ambient light sensor detects the ambient light - the light shining on the phone - and allows the phone to automatically adjust the backlighting for best viewing. The proximity sensor is up near the earpiece. It can detect when something is within a centimeter or so of the earpiece.