They use a satellite system called Global Positioning System.
Satellites send signals to navigation receivers on the ground.
The time it takes for signals to the receiver helps determine its location.
The navigation system then uses this information to determine direction, speed, and distance.