GPS
GPS is a system of 30+ navigation satellites circling Earth. We know where they are because they constantly send out signals. A GPS receiver in your phone listens for these signals. Once the receiver calculates its distance from four or more GPS satellites, it can figure out where you are.