The Global Positioning System that we use was built by the US military and has been fully operational since 1995. There are other partially built or proposed satellite positioning systems, but none of these is fully operational yet.
The GPS system currently has 31 active satellites in orbits inclined 55 degrees to the equator. The satellites orbit about 20,000km from the earth’s surface and make two orbits per day. The orbits are designed so that there are always 6 satellites in view, from most places on the earth.
The GPS receiver gets a signal from each GPS satellite. The satellites transmit the exact time the signals are sent. By subtracting the time the signal was transmitted from the time it was received, the GPS can tell how far it is from each satellite. The GPS receiver also knows the exact position in the sky of the satellites, at the moment they sent their signals. So given the travel time of the GPS signals from three satellites and their exact position in the sky, the GPS receiver can determine your position in three dimensions – east, north and altitude.
There is a complication. To calculate the time the GPS signals took to arrive, the GPS receiver needs to know the time very accurately. The GPS satellites have atomic clocks that keep very precise time, but it’s not feasible to equip a GPS receiver with an atomic clock. However, if the GPS receiver uses the signal from a fourth satellite it can solve an equation that lets it determine the exact time, without needing an atomic clock.
If the GPS receiver is only able to get signals from 3 satellites, you can still get your position, but it will be less accurate. As we noted above, the GPS receiver needs 4 satellites to work out your position in 3-dimensions. If only 3 satellites are available, the GPS receiver can get an approximate position by making the assumption that you are at mean sea level. If you really are at mean sea level, the position will be reasonably accurate. However if you are in the mountains, the 2-D fix could be hundreds of metres off.
A modern GPS receiver will typically track all of the available satellites simultaneously, but only a selection of them will be used to calculate your position.
via How GPS Works.