A P-wave is a primary wave or a compressional wave. Its amplitude is compression in the direction of wave propagation. An S-wave is a secondary wave or a perpendicular wave. Its amplitude is perpendicular to the direction of propagation. So, when P wave is up and down, the S wave would be from side to side.