The compressor is a wonderful tool when used properly, however, often the basics of compression are misunderstood, leaving audio that would have been better left untouched.
A compressor is a threshold effect that will squeeze dynamic range. If a sound has dynamics (increases and decreases in volume), a compressor will push them together.
This type of effect is called compression and is not to be confused with computer files compression (making files smaller) such as zipped folders or compressed mp3 files.
Imagine a clay model of a head face. If you push down hard on the clay, it will be squeezed down, together and out. You will still be able to see the features of the face, but they will look shoved together and the whole model may be thicker.
The only problem is that you would have lost any hair the model may have had. If you keep pushing, you will end up with a bumpy brick of clay rather than a head. The picture of the face is being gradually compressed (as if it were a sound continuing to go louder than a compressor threshold). First the hairs and top and bottom of the face are squeezed in.
Then the face is compressed into a densely packed box. Notice that the ears, eyes and mouth remain the same size and in the same positions throughout the whole process, and that they take up a much larger percent of the overall face after the compression.
Compressing sound works the same way. You can control the dynamics so the sound fits into a smaller and denser dynamic range, and also you can “bring out” some softer parts of a sound.
Click to enlarge.
However, you do lose anything that may have been important in the parts that are squeezed out of recognition (such as the hair and the shape of the head). Compressors will stop a sound from getting too loud beyond a certain point. You set the threshold for where the compressor will begin to work (at a whisper, shout or normal volume), then set the ratio for amount of compression.
The higher the ratio, the more the increase in volume will be pushed back, and the faster the sound will become more of a “solid brick” with fewer features.
Compressors can be used to control volume (especially in situations where volumes can be unpredictable and you absolutely cannot overload anything, such as a live broadcast of a speech) or to change the sound of an instrument.
Since the louder parts of a sound cannot get louder beyond a certain point, the softer parts of a sound (which are not held back at all) can actually be heard more loud and be a bigger part of the overall sound. This can be used to make a drum room track thicker or to sustain a guitar by making the later (and softer) parts of a sustaining note loud.