What is a compressor?
A compressor takes the signal from your guitar and kind of squishes it together, making your sound more even by flattening out the difference between the quiet and the loud frequences from your instrument. It shapes the sound and can be used in many ways - to level a signal, for more sustain or to alter the envelope. The compressor is often used when mixing a recording or on vocals on a live show and it is an essential tool for most musicians.
Any good example?
One of the most famous compressor users among guitarists, and one that is really easy to hear, is David Gilmour of Pink Floyd who uses his compressor everywhere. His fat, rich and well sustained sound depends not only on his great guitar hands but also very much on his compressor. Oterherwise you can hear a compressor everywhere, you may just not notice it. Whenever you hear a very even sound, like a picked figure on a chord where every note ssounds equal in attack, there´s probably a compressor working somewhere in the chain.
Which pedal should I get?
There are many great choices. David Gilmour uses the classic MXR Dyna Comp and so does the Edge of U2 and Pete Townsend of The Who. Roger McQuinn of The Byrds relies on a Janglebox for his jangly, trebly sound. Another classic pedal is the Diamond CPR-1, a cheaper (and smaller, which is great for the crammed pedal board) unit is the pretty similar sounding Mooer Yellow Comp. There's also the Mad Professor Forest Green, which is a neat choice, or the Keeley 4-Knob Compressor. Check them out!