How do P and S-waves move?

Primary (compressional) waves
P-waves are the fastest waves created by an earthquake. They travel through the Earth’s interior and can pass through both solid and molten rock. They shake the ground back and forth – like a Slinky – in their travel direction, but do little damage as they only move buildings up and down.

Secondary (shear) waves
S-waves lag behind P-waves as they travel 1.7 times slower and can only pass through solid rock. However they do more damage because they’re bigger and shake the ground vertically and horizontally.