Primary and secondary waves are body waves that travel within the Earth. The motion and behavior of both P and S waves in the Earth are monitored to probe the interior structure of the Earth. Discontinuities in velocity as a function of depth are indicative of changes in phase or composition. Differences in arrival times of waves originating in a seismic event like an earthquake as a result of waves taking different paths allow mapping of the Earth's inner structure.