Compression Pedals essentially do two things that many guitarists find desirable, 1) enhance sustain and 2) compress the volume levels of the frequencies present to achieve a more "even" sound output. Compression can often add improved dynamics (more percussive) to pick attack, especially with the heavier strings on the guitar. From a studio standpoint, compression is an extremely useful tool to manage clipping since the various frequencies have been "equalled" out. While this certainly has it's merits, it's also the downside of compression. Some guitarists are opposed to using compression as it takes away some of their expressivity. This stems from the fact that regardless of how hard or light they play the strings, the volume of the individual notes stays constant when a high amount of compression is applied. Since compression can also enhance sustain, it tends to add unwanted noise to the signal chain. This is often controlled through the use of noise gates or suppressors at the end of the chain. Compression technology continues to improve and some manufactures are employing "parallel" compression technology. Instead of the whole signal being subjected to the compression, the signal is split into a processed and unprocessed path. The processed path is compressed to the liking of the user and then added back to the original, unprocessed, signal. This approach has been revered by many guitarists as the best of both worlds. Experimentation is, often, the best way to find out how much compression (if any) is right for you.
Most compression pedals will have attack, tone, sustain, and level controls. Sustain and tone are self explanatory. Things get a little more challenging when working with the attack and level functions. Attack represents the amount of time from the sound of the original note to when the compression is applied. The level function is the amount of compression applied after the attack time. If the level knob is turned all the way up, the volumes of the individual frequencies will be very close......often referred to as "squashed". Keep in mind that certain guitar effects do add compression to your signal. This is especially the case with distortion. Generally speaking, compression is not normally an effect that is used to the extreme. Rather, it is used to provide just enough "smoothing" or "sustain" to supplement a guitar signal.