Help with understanding how distance is calculated in Earth

Help with understanding how distance is calculated in Earth