This derivation is often neglected, because it is slightly involved (for an ungergraduate presentation) in Newton's way of thinking, with explicit forces, although this is how Newton did it, and it is a little too trivial if you use stress tensor concepts. I will use the stress tensor concept.
Momentum is a conserved quantity, and you should be familiar with the conservation law in differential form:
$$ \partial_t \rho + \partial_i J^i = 0 $$
Where the repeated i index is summed (Einstein convention). This is clearest in space-time, where the density $\rho$ becomes the time component of a 4-vector, but it is just as true in Galilean Newtonian mechanics.
For momentum, you have three separate conserved momentum densities $p^i$ which obey a conservation law:
$$ \partial_t p^j + \partial_i T^{ij} = 0 $$
Where the interpretation of $T^{ij}$ is that it is the flow of the i'th component of p in the j direction. There are three equations, since there are three separate conserved quantities--- the x,y,z momentum.
If you compress a region of air, you get a little bit more pressure. The form of pressure is a diagonal stress density, by rotational symmetry (it is also intuitive--- pressure pushed out--- so x-momentum goes in the x direction, y-momentum goes in the y-direction and so on).
The stress T for a pressure is therefore
$$ T^{ij} = P(\rho) \delta^{ij} $$
If the material starts out at position x (at each x there is a different infinitesimal volume of material) and the material which would be at x when everything is still is moved at time t to x+\delta X(x,t), then the momentum density is
$$ p^{i} = \rho {\partial_t X(x,t)}$$
Assuming $\rho = \rho_0(1 - \delta v)$ where the infinitesimal volume compression, which gives the change in the density, is given by the divergence of X (this is geometrically clear if you draw a picture, or just from the definition of divergence)
$$\delta v = \partial_j X^j $$
To first infinitesimal order, then the pressure is
$$ P (\rho) = P(\rho_0) - C\delta v = P(\rho_0) - C \partial_i X^i $$
Where $ C= {dP\over d\rho}$
Now, for mathematical convenience (I do not want to deal with transverse sound), consider reducing to one dimension. In this case X(x) is just a one-dimensional function that tells you the displacement, and the stress is just $T^{11} = \rho_0 \partial_x X$ (the flow of x-momentum in the x-direction).
The continuity equation in 1d gives you
$$ \rho_0 \partial^2_t X - \rho_0 C \partial^2_x X = 0 $$
And this is the wave equation with the speed of sound squared equal to C. You can repeat the 1d analysis with detailed forces, not using the slightly more abstract continuity equation, and this is what Newton did to find the speed of sound way back when.
To see that the one dimensional equation above describes waves moving with a speed $\pm \sqrt{C}$, consider the functional form of such a wave moving with velocity c:
$$ \phi(x,t) = f(x-ct) $$
where f is a function of one dependent variable. Differentiate twice in time
$$ \partial^2_t \phi = c^2 f'' $$
and twice in space:
$$ \partial^2_x \phi = f'' $$
and you see that it satisfies the wave equation:
$$ \partial^2_t \phi - c^2 \partial^2_x \phi = 0 $$
The general solution to the 1d equation can be expressesed as the sum of a left-moving and a right-moving wave. This can be used to match any initial conditions of $\phi$ and $\partial_t\phi$, and is therefore the general form. You can derive the general solution from a systematic general theory using Fourier transforms, by considering plane waves.