What do the proximity and orientation sensors in the iPhone do?
The "high technology" sensors (as Apple calls them) in the iPhone are some of the more exciting features this new device brings to the table. These sensors won't result in the iPhone doing anything other phones aren't capable of, but it will let the iPhone do it without instruction from you.
The proximity sensor:
This sensor detects how close the screen of the phone is to your body. This allows the iPhone to sense when you have brought the phone up to your ear. At that point, the iPhone turns off the display in order to save battery. It also stops detecting touches, as to avoid unwanted input, until you take the phone away from your ear.
The orientation sensor:
This sensor detects how you are holding the iPhone. Specifically, the orientation sensor is able to determine whether you are holding the iPhone vertically or horizontally. As you change the way you are holding the phone, the iPhone switches the display from landscape to portrait mode (or vice-versa).
There is one other sensor in the iPhone worth mentioning - the ambient light sensor. This sensor detects the brightness of your surroundings and adjusts the iPhone's display to maximize visibility.