I have used "Find my Mac" to find our Macbook Pro. It was pretty accurate and was able to place the computer within 10 feet of its actual location. I started thinking about how it actually works, since the MBP doesn't have a GPS. How does "Find my Mac" work?
It checks what Wifi networks are in range and then looks up their locations in a big database of known Wifi access points -- I think Apple use the Skyhook database.
Wi-Fi Positioning system (WPS)
The Mac can use Wi-Fi network identification for localization. This is called a Wi-Fi Positioning System (WPS). The access points name and signal strength is determined and looked up in a database to identify the location. The more access points are found, the more precise the localization.
Unlike GPS (Global Positioning System) or cell-tower triangulation (together called Assisted-GPS), the Wi-Fi based localization works well inside buildings.
There are different databases which collect wireless access points:
Even without a GPS chip, your location can be determined using your MAC address, SSIDs of WiFi networks in range (both private and public networks), their signal strength, etc. In Apple’s case, this data is submitted to the Skyhook Wireless service, which then returns a set of GPS coordinates (latitude, longitude).
If you’re interested in how geolocation works in other devices and applications, and what data is being sent back and forth exactly, see this answer on Stack Overflow which explains how Firefox does this using Google’s geolocation service (which is what most other apps use).