How do they know about the pith and that it's a wave?
What you're maybe confused about is that textbooks often oversimplify and depict sound as a pure sine wave. That only rarely happens, and is usually man made.
Day-to-day sounds can be approximated as the sum of such perfect sine waves. Fourier transformations are a well known method for that.
That approximation usually isn't perfect. But it's good enough to be usefull.