Timing, not tracking
Satellites broadcast the time they sent each signal. Your phone measures the tiny delay and converts it to a distance, because radio waves travel at a known speed.
Three spheres and a correction
Distances from three satellites narrow your position to a point. A fourth corrects your phone's cheap clock, which is nowhere near as accurate as the satellites'.
Why cities confuse it
Signals bounce off tall buildings and arrive late, adding error. Phones fall back on wifi networks and mobile masts, which are mapped and often more accurate indoors.

