For a transverse wave like a wave on a string, when the wave is traveling in the x-direction the pieces of string oscillate back and forth in the y-direction. For a longitudinal wave like a sound wave the oscillations are parallel to the direction the wave travels.
For a wave traveling in the +x direction, for instance, the oscillation of the particles in the medium in the x-direction can be described by:
s(x,t) = sm sin(ωt -kx)
The oscillations of the particles produces small changes in pressure in the medium. A higher density of particles corresponds to a higher pressure, and a lower density corresponds to a lower pressure. Examining the simulation closely, it can be seen that when a particle has a displacement of zero, the pressure is at a maximum or minimum. High pressure at a point occurs when neighboring particles come toward the point; low pressure when the neighboring particles move away.
If the particles at a given point fluctuate following a sine, the pressure there fluctuates like a cosine, 90 degrees out of phase with the displacement.
Δp = Δpm cos(ωt - kx)
The relationship between the maximum pressure change Δpm and the maximum displacement amplitude of the particles sm is:
Δpm = (v ρ ω)sm
This is derived in the book.