A quake does not travel as one wave. It leaves as two — and the gap between their arrivals is a ruler laid across the earth.
The primary wave is a push — rock compressing and rebounding along the direction of travel. It is the fastest thing the earth carries, near six kilometres a second in the crust, and it is the first tremble any drum records.
The secondary wave shears the ground sideways and moves at roughly six-tenths the speed. It cannot pass through liquid at all — which is how we learned the outer core is molten, from the shadow where no S ever arrives.
Because P and S leave together but arrive apart, the delay between them grows with range. Multiply the S−P gap by about eight and you have the kilometres to the source — one station, one number, and the earth gives up where it broke.