NOTE: This information is out of date as of the release of the iPhone 3G. All iPhones now contain full GPS features.
How does iPhone location awareness work?
With the release of firmware 1.1.3, the first-generation iPhone knows where you are. At least, it can figure it out.
This is extremely helpful in using the phone to get driving directions and real-time traffic information. The feature does not employ a GPS (global positioning system). While GPS is more accurate — the iPhone is only accurate to within a few hundred feet, while GPS is generally accurate to within a few feet — it would also require bulkier hardware and more battery life.
Triangulation, Not GPS
Instead of using GPS, the iPhone uses a technique called triangulation to determine where it is. This is done by bouncing a signal off three cellphone towers near the phone. By measuring the three responses, it’s possible to roughly pinpoint the location of the phone that’s sending the signal — and thus give you the location-specific information you need.