The quick and dirty of Wifi triangulation:
Originally Posted by gaudenti
Google in an their infinite wisdom (read: money) drove around with their Street View mapping service. A secondary point was to listen for Wifi networks. Each network has a unique ID that identifies it. They recorded these networks, along with the actual GPS position (from a really precise GPS receiver).
So, Wifi triangulation (aka Google Location Services) works by looking around you using your wifi connection. It finds the networks that are available and the ID's for each. It then tells google "Hey, I know these networks are near me and the strength of the signal). Google says "Hey, I know 3 of those networks. They are at approximately 34.64585986,-102.8364640 (aka 123 Main St)".
It's like being able to figure out where you are by looking at your neighbors. It's not very accurate, but close enough that if you gave me the position it reported, I could go there and actually see you 50 meters away or so. For most purposes, it is great for a general location. For things like geocaching, well, you'll be searching for a while.
Cell phones use this a lot since they have a data connection and an underpowered GPS receiver. In a pinch, it works to get general location information when no other data is available (such as GPS satellites).