The Global Positioning System (GPS) consists of 24 earthorbiting
satellites operated by the US Department of Defense.
These satellites allow any person who owns a GPS receiver to determine his or her precise longitude, latitude and altitude anywhere on the planet.
Until recently, inflated prices and Cold War politics
conspired to keep GPS receivers out of the hands of the average civilian.
But now, for as little as $100, you can know exactly where you are and where you have been. For anyone who has ever been lost  while hiking in the woods, boating in the ocean, driving in a unfamiliar city or flying a small airplane at night  a GPS receiver is a miracle.
When you use a GPS receiver, you're never lost!

The gps receiver uses a slightly different approach. It measures its distance from the satellites and uses this information to compute a fix. How can it measure distance? Well it really measures the length of time the signal takes to arrive at your location and then based on knowing that the signal moves at the speed of light it can compute the distance from knowing the travel time. However, unlike the known sites of the olden days, these sites are moving. The solution to this problem is to have the satellite itself send enough information to calculate its current location relative to your receiver. 
Armed with the satellite location and the distance from the satellite
we know that we are somewhere on a sphere that is
described by the radius (distance) and
centered at the satellite location. 
By acquiring the same information from a second satellite we can compute a
second sphere that cuts the first one at a plane. Now we know we are somewhere on the circle that is described by the intersection of the two spheres. 
If we acquire the same information from a third satellite we would notice that the new sphere will intersect the circle at only two points. 
If we know approximately where we are we can discard one of those points and we are left with our exact location on the surface of the globe. 
In fact, it works a little too well, according to the Department of Defense. Worried that GPS could be used by an enemy to guide missiles or smart bombs, the defense engineers built errors into the system. GPS satellites send out two signals: an encrypted signal for military use and an unencrypted, less accurate signal for civilians. After the downing of Korean Flight 007 in 1983 a tragedy that might have been prevented if its crew had access to better navigational tools President Ronald Reagan issued a directive that guaranteed that GPS signals would be available at no charge to the world. GPS burst into public awareness during the Persian Gulf War in 1991. GPS was used extensively during that conflict, so much so that not enough militaryequipped GPS receivers were available. To satisfy demand, the Department of Defense acquired civilian GPS units and temporarily changed GPS transmissions to give civilian receivers access to higheraccuracy military signals. In May of 2000, Clinton announced plans for increased accuracy in GPS service for civilians. 
Summary: Despite its hightech trappings, the central concept behind GPS is as old as celestial navigation. But instead of using stars for triangulation, modernday mariners use GPS satellites. If you know your exact distance from a satellite, you know your location lies somewhere on the sphere defined by that radius. If you know the distance from a second satellite, you know your location must lie along the circumference of the circle where the two spheres intersect. A third satellite results in two points where all three spheres intersect. One of these points is way out in space. This straightforward technique of measuring various distances and then triangulating your position gives your precise location. 