The following is one of the best compressor explanations. It's from YEP's
"Why do your recordings sound like ass?"
http://forum.cockos.com/showthread.php?t=29283&page=7
Post 247 and 248 is a discussion about compression.
"How a compressor works
Inside the compressor is a little gremlin that turns down the volume. That's it. Really. HOW and WHEN he turns down the volume is determined by the instructions you give him with the compressor controls.
THRESHOLD sets the gremlin's alarm clock. It is what tells him to wake up and start doing what he does, i.e. turning down the volume. If you set the threshold at -10dB then the gremlin just sleeps his lazy ass off, doing nothing at all until the signal level goes above that threshold. A signal that peaked at anything lower than -10dB will never wake up the gremlin and he'll never do a damn thing. (see why presets could be problematic?) But once the signal goes above the threshold, the gremlin rips off the sheets and springs into explosive action.
RATIO decides HOW MUCH the gremlin turns down the volume, and it acts completely in relation to the threshold. If the ratio is set to 2:1, and the signal goes ABOVE the THRESHOLD, then the gremlin will cut that signal in half. For example, with -10 threshold, a signal that hits -5 (which is 5dB ABOVE -10) will be turned down 2.5dB for an output of -7.5dB. Negative values can be confusing if you're not used to thinking in such terms so re-read and ask questions if you're stuck. This is important, and it does get instantly easier once you "get" it.
ATTACK is like a snooze button for the Gremlin's alarm clock. It lets the gremlin sleep in for a little while. So if the THRESHOLD is set for -10dB, and the ATTACK is set to, say, 50ms, then once the signal goes above -10dB, the gremlin will let the first 50ms pass right by while he rubs his eyes and makes coffee. An attack of zero means the gremlin will respond instantly, like a hard limiter, and will allow nothing above threshold to get through unprocessed. Any slower attack means the gremlin will allow the initial "punch" to "punch through" and will only later start to act on the body of the signal.
RELEASE is like a mandatory overtime clock for the gremlin. It tells him to keep working even after the signal has dropped below threshold. A release of zero means strict Union rules-- once the signal drops below threshold, the whistle blows, and the gremlin drops whatever he's doing and goes back to sleep. But a slower release means the gremlin keeps compressing the signal even after it has dropped below the threshold. This can lead to smoother tails and less "pumping" or "sucking" artifacts that come from unnatural and rapid gain changes."