I wrote how GPS works over in another thread:
"To calculate the time the GPS signals take to arrive, the GPS receiver needs to know the time very accurately. Rather than have to install an expensive atomic clock within the receiver itself, a signal from a fourth satellite is used by the receiver to solve an equation that lets it determine the exact time.
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. The GPS receiver needs 4 satellites to work out your position in 3 dimensions, including altitude. 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."