Wiki usually explains better than me:
http://en.wikipedia.org/wiki/Dynamic_range_compressionIt's an effect like EQ, reverb etc. Along with EQ it's probably the most commonly used - pretty much every song you listen to will have had all kinds of compression used.
In short, a compressor reduces the volume of sounds that exceed a certain threshold (which is normally selectable by the user). So, it kind of evens out the volume of a track, which is very useful when dealing with things that have a large dynamic range (vocals for instance), which can in parts be buried 'in the mix' or in other parts be much louder than anything else.
When you compress something, by reducing it's peaks you generally reduce the overall perceived volume so you usually apply something called 'make-up gain' after compression. It's just a volume knob on the compressor. So in effect you are increasing the volume of quiet parts relative to loud parts.
Compressors come in all shapes and forms and can have a variety of controls. Some common controls:
Threshold : Volume above which the compressor kicks in
Ratio: Basically the amount of compression - how strongly the compressor reduces the volume of parts exceeding the threshold. Low ratio = low compression, etc. If the ratio is 'infinite' (in general, that is anything above 20:1), the compressor becomes a 'limiter' (confusing...) which is basically a compressor which doesnt allow ANYTHING to exceed the threshold limit - all parts that would normally exceed it are totally squashed back down under it.
Attack: Usually in ms, it controls how quickly the compressor responds to peaks in volume
Release: Intuitively, this controls how quickly the compressor 'relaxes' after responding to the peak in volume
Make-up gain: The volume you add after compression to compensate
You can get all kinds of different compressors (both in the digital plugin world and in hardware) and when you get nerdy, you notice that they all react differently and have their own unique sound or signature. Which is why you might hear about engineers sending tracks through a compressor that isnt doing anything, or using lots of different compressors etc etc.
There are also many different ways to use a compressor: on single tracks, on groups of tracks, parallel compression, multi-buss compression, multi-band compression, on effects returns etc etc....
Most DAW's come with compressor plugin which you can play with (if you are using a DAW - if not, reaper is free
), and hardware compressors range from £100 - £10,000