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. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.