Although compression can be used as an obvious effect, it's more likely to be used as a subtle tool. One of the reasons guitarists may be wary of compressors is that what they do isn't always that obvious. Take the compression away, however, and it will be missed.
The simplest explanation of a compressor is that it's an automatic volume control that turns down your signal when it exceeds a predetermined threshold, attenuating or squashing signal peaks.
Basically, it makes the quieter parts of an audio signal louder and the louder parts quieter: in effect, it's narrowing the dynamic range of a signal and delivering a more consistent overall loudness.
The use of a compressor pedal give really improve your guitar sound. It can smooth, thicken and tighten your sound by evening out the volume differences between the notes or chord strikes. If you are less than consistent with your pick strikes, a compressor can come to your aid, delivering more constant dynamics: great for chord work or playing tight, highly rhythmic funk.