The DME
Distance Measuring Equipment (DME) tells the pilot the distance they are from a ground based DME station.
The pilot selects a DME frequency on the cockpit distance measuring equipment and the distance is displayed in nautical miles (nm). Many DME units also show the speed at which you are flying towards or away from the ground station and the time it will take you to reach it.
A typical cockpit DME display
How the DME Works
The aircraft DME sends a signal out on the selected frequency which is received by the ground DME station. The ground station then sends this signal back to the aircraft and the time taken for this process is used to calculate the distance.
Slant Range
The distance given by a DME unit is the straight line distance from the aircraft to the ground station – known as slant range. This straight line distance is longer than the distance over the ground.
So when you are directly overhead a DME ground station, the cockpit equipment will not display zero – it will in fact be equal to your height in nautical miles.
DME Limitations
Combined VOR and DME
VOR and DME ground stations are often combined to form a VOR/DME. This lets the pilot track a radial to a VOR while also knowing their distance from the station, so they can know their exact location (known as a position fix).
For more about the DME, check out this Bold Method article: https://www.boldmethod.com/learn-to-fly/systems/understanding-dme-on-instrument-approaches-and-vfr-use/