Energy released during an earthquake generates various seismic (seismos = earthquake) waves that travel through the earth. The primary (p) wave and secondary (s) waves travel through the interior of the earth but follow different paths. The difference in time between the arrival of the p and s waves can give a rough estimate of the distance to the earthquake.