We investigate the form of the one-point probability distribution function (pdf) for the density field of the interstellar medium using numerical simulations that successively reduce the number of physical processes included. Two-dimensional simulations of self-gravitating supersonic MHD and hydrodynamic turbulence, and of decaying Burgers turbulence, produce in all cases filamentary density structures and a power-law density pdf with logarithmic slope around -1.7. This suggests that the functional form of the pdf and the general filamentary morphology are the signature of the nonlinear advection operator. These results do not support previous claims that the pdf is lognormal. A series of 1D simulations of forced supersonic polytropic turbulence is used to resolve the discrepancy. They suggest that the pdf is lognormal only for effective polytropic indices $\gamma=1$ (or nearly lognormal for $\gamma\not=1$ if the Mach number is sufficiently small), while power laws develop at high densities if $\gamma<1$. We evaluate the polytropic index for conditions relevant to the cool interstellar medium using published cooling functions and different heating sources, finding that a lognormal pdf may occur at densities between 10$^3$ and at least 10$^4$ cm$^{-3}$. Several applications are examined. First, we question a recent derivation of the IMF from the density pdf by Padoan, Nordlund & Jones because a) the pdf does not contain spatial information, and b) their derivation produces the most massive stars in the voids of the density distribution. Second, we illustrate how a distribution of ambient densities can alter the predicted form of the size distribution of expanding shells. Finally, a brief comparison is made with the density pdfs found in cosmological simulations.