A GPS receiver uses trilateration to determine its position on the surface of the earth by timing signals from three satellites in the Global Positioning System. The GPS is a network of satellites that orbit the earth and send a signal to GPS receivers providing precise details of the receiver's location, the time of day, and the speed the device is moving.
Each satellite in the GPS constellation sends out periodic signals along with a time signal. These are received by GPS devices, which then calculate the distance between the device and each satellite based on the delay between the time the signal was sent and the time when it was received. The signals travel at the speed of light, as they are a type of radio waves, but there is a delay because the satellites are at an altitude of tens of thousands of kilometres above the earth.
Once a GPS device has distances for at least three satellites, it can do the trilateration calculations. Trilateration works in a similar way to pinpointing your position on a map knowing the precise distance from three different landmarks using a pair of compasses. Where the three circles centred on each of the landmarks overlap is your location given the radius of each circle is your distance from each landmark.