It does this using satellites and receivers. How the system works is by the satellites sending information to receivers. This information includes time, position, and satellite strength among other things. The receivers pick up this information and use it to determine the users location. Using the signals from at least 4 satellites, a receiver can determine latitude, longitude, and elevation.
Some receivers can then convert the latitude and longitude into other coordinate system values.
The accuracy of GPS depends on several factors such as which receiver is being used, the surroundings it's being used in, and Selective Availability. Selective Availability is the Department of Defense deliberately interfering with the satellite signals to reduce positional accuracy to around 30m - 100m. PPS receivers are used by the military and are not affected by Selective Availability. Currently there are efforts under way to end the use of Selective Availability. DGPS Differential GPS uses position corrections to attain greater accuracy.