It uses cell triangulation, WiFi location, and/or GPS, depending on which is in use and available at the time. GPS is useless indoors unless the receiver can "see" four or more satellites (generally meaning outdoors or near a southern window), and the receiver/antenna combination in the iPhone is nowhere near the most sensitive available.
As I understand it, Location Services is not an active broadcast, but rather allows your position to be relayed back to any app that utilizes it when requested. With Edge/3G, WiFi, and/or GPS on, your location is always available. It's just a matter of whether you want that position sent to the requesting app. More of a privacy thing, really.