What Is Dynamic Range Compression?
As long as you have not been living in a cave your entire life, whether you know it or not, you have been exposed to dynamic range compression, or simply referred to as, "compression." Do not be alarmed, this not a life-threatening process.
Compression (a type of dynamic signal process) can be thought of as a way to automatically control the volume of a specific source (vocals, guitar, drums) either by turning it down (downward compression, Figure 1.1), or turning it up (upward compression, Figure 1.2).

In order to have a clearer understanding of what a compressor does, picture yourself watching cable-TV. We all at one point have experienced the commercials sounding louder than the normal program. Many of us will often use the TV-remote to turn down the volume (gain reduction) when the commercials (input level) come on. We revert to turning up the volume when the normal program starts to air.
Our focus will not remain on TV, so for the remainder of this document we will use downward compression as an example when discussing techniques and controls. Compression is an extremely important process to any modern-day recording, and if it is used properly the listener should not be able to detect it unlike panning (left to right movement), delays or reverbs (time effects).
Compression has the ability of adding gain or reducing gain in a faster, more precise manner than a human does. Let us focus on the controls that make this possible. These controls can be found in most compressors.
Threshold
The threshold determines at what level gain reduction needs to be applied.
Ratio
The amount of gain reduction is dependent upon the ratio control. The ratio control can be set from 1:1 (no gain reduction will be applied) to ∞:1. Let us look at a 3:1 ratio; this would mean that if the input signal (source) is 3 dB (decibel, measurement of voltage) above the threshold, the output (the signal after being compressed) would only be 1 dB over the threshold. This means that 2 dB of gain reduction has been applied. If we are using a 3:1 ratio, and we have the threshold set to -15 dB this means when the source signal is -12 dB the output will be -14 dB.
Attack and Release
These two controls tell the compressor how fast or slow gain reduction needs to be applied (attack) to the signal and when it should stop (release) affecting the signal. These are often depicted with increments of time (usually milliseconds), but compressors can also be found with auto-attack and release features that depend on the characteristics of the input signal.
Hard Knee/Soft Knee
This control defines the characteristic of the compressor. A hard knee setting will tell the compressor to clamp down on the input signal with greater force. A soft-knee setting will provide a more gradual compression as the input signal approaches the threshold.
Output Gain (Makeup Gain)
With gain reduction being applied to the input signal thus reducing the dynamic range, the entire signal can now be raised to an optimum level by adjusting output gain. This is set by applying a fixed amount of gain.
Why Use Compression?
Almost every musical instrument including the voice has a dynamic range. When recording a song, instruments are often competing with one another to be in the mix. A guitar could easily drown out a voice, while a kick drum could make a bass guitar almost obsolete. Compression allows us to level the playing field, and easily mix a whisper with a growling guitar.
Let us take for example the human voice: while a person is singing, the song may call for a wide range of emotions from a whisper to an extremely loud yell. Without compression we would be unable to turn up the entire vocal track due to the parts using the, "yelling," voice being too loud. After applying gain reduction (bringing the 'yells' down closer to the level of the whisper) we would then be able to turn up the volume of the vocal track because we've reduced the dynamic range. This would then allow us to hear the whispering parts in the entire mix.
Where Will You Hear Compression In Use?
Remember, if compression is being used properly you should be unable to detect it in a recording. There is a wide range of uses for compression: radio broadcasts, TV broadcasts, movies, live sound, installed sound, studio recordings, and just about anything you listen to. Compression in audio is important as peanut butter is in a PB&J.