P-waves and S-waves move through solids at different speeds from each other, and through different kinds of solids (such as granite and sandstone) at different speeds.
Every seismographic station has a chart that gives the relationship between time and distance travel for each kind of wave, given the unique environment around the station.
The difference in time between when the P- and S-waves registered on the seismographs is plotted on the chart. The chart then provides the distance the waves have traveled.
Let’s say that three seismographic stations record the traveling distance of the same shock waves. A circle is drawn around each station at the distance recorded. The point at which the three circles intersect is the earthquake’s epicenter.
Underground transverse and longitudinal shock waves cause the surrounding rock to expand and compress during an earthquake.
Using the same specialized graph, scientists can tell exactly when the earthquake hit the epicenter.
If the epicenter is 100 miles (160 kilometers) away and it takes P-waves 24 seconds to travel 100 miles (160 kilometers) to a specific seismograph, the earthquake hit the epicenter 24 seconds before the seismograph recorded the P-waves.