P waves vibrate in the same direction in which they spread, compressing and expanding the materials they pass through.
S waves vibrate perpendicullary to its direction in which they spread, and they make the materials which they pass range that way.
Hope this helped you :)