The basis of GPS is "triangulation" from satellites. To "triangulate," a GPS receiver measures distance using the travel time of radio signals (distance to a satellite is determined by measuring how long a radio signal takes to reach us from that satellite). To measure travel time, GPS needs very accurate timing. Along with distance, you need to know exactly where the satellites are in space (ephemeris).
You may find it helpful (as well as fun!) to Play GPS: The New Navigation, a very cool Shockwave game which helps you to visualize how GPS determines your position on Earth.