Math behind the GPS


How does the GPS work? What is the mathematics behind it?