I started writing this in the "modellers topped out" thread to address some misunderstandings about how digital audio works, and decided that it deserves it's own thread. Here you go:
--------
Here is the executive summary of how digital audio works:
Think of a sine wave on a chart (if you don't know what a sine wave is, think of an S turned on its side). This is a sound wave in the air, which is what our ears hear. Now imagine if under the curve of the wave, you drew straight vertical lines that went from the bottom of the page to the bottom of the curve. Finally, draw a straight line between the tops of each of the lines. You will notice that the "connect the dots" line is pretty close to, but not exactly the same as, the original line.
This is how sound is represented digitally. The computer has a list of numbers, each representing one of these lines, and when they are played through the D/A converter (which essentially "connects the dots") the result is an audio signal. The lines are referred to as samples. Software that processes audio is essentially just changing the value of those samples.
Digital audio quality is measured using two values: sample rate, and sample size.
The sample rate is the number of samples per second, measured in Hertz. The more samples there are, the closer the "connect the dots" line will be to the real audio wave. This is why higher sample rates are preferable. CD audio has a sample rate of 44.1 kHz, or 44,100 samples per second.
Sample size is exactly that: the size of each sample. As I said, a sample is simply a number; the sample size determines how big that number is allowed to be. The bigger the number, the more precise the sample will be. Imagine you had to spell your name on the top of a desk using building blocks. If you used a small number of really large blocks, it would be difficult to make your name readable. With lots of small blocks, it would look much better. Now apply this analogy to the lines under the sine wave: if the lines were made of only a few big blocks, they would not accurately represent the wave. This would be a small sample size.
One thing that confuses a lot of people is that sample size is measured in bits. For example, CD audio has a 16 bit sample size. This does NOT mean there are only 16 levels of sound possible in a sample. 16 bits refers to the size of the number in binary, which happens to be 65,536. This means that the sample can have over sixty-five thousand possible values.
Combining sample rate and sample size, we can get an idea of just how much data is used to process the audio. Using the CD example again (16 bit 44.1 kHz), we know that there are 44,100 samples, each with up to 65,536 possible values, per second of audio. That's a lot of precision! Yes, it is still not a perfect curve, but it is so close our ears can't tell.
I hope that is a good explanation.