Ok, let's get geeky.

Basically, it works because it contains so many frequencies of sound that any other sound generated (such as a barking dog or crying baby) simply joins with the white noise sound without changing its effect on the human ear. Meaning all you hear is the white noise, regardless of other environmental sounds.

White noise is a random signal (or process) with a flat power spectral density. In other words, the signal contains equal power within a fixed bandwidth at any center frequency. White noise draws its name from white light in which the power spectral density of the light is distributed over the visible band in such a way that the eye's three color receptors (cones) are approximately equally stimulated.

White noise is the sound equivalent of white light. It is composed of all the sound wavelengths and frequencies in the sound spectrum. It sounds like a hum and is very soothing. It can be described as a flat noise spectrum.

Parts of this geeky explanation are licensed under the GNU Free Documentation License and contains material from the Wikipedia article "White Noise".