P waves are produced by all earthquakes. They are compression waves that form when rocks break due to pressure in the Earth. S waves are secondary waves that are also created during an earthquake. They travel at a slower speed than the p-waves.
S waves are the waves that come after the earthquake and P waves