During the 1970s compressors for the electric guitar became available in stompbox units. Compressors come in different forms from stompbox to rack units and give other effects different sound characteristics when used together. Distortion or overdrive effects work well with compressors and are commonly used together. A common mistake when using a compressor with distortion and overdrive is putting the compressor after the overdrive in your chain of guitar pedals. Doing this will amplify unwanted noise from your guitar while bringing the sound you want down in volume.
The loud and quiet sound frequencies from the electric guitar’s signal are adjusted by a compressor so the volume level of the outgoing signal is "squeezed" or "squashed" together somewhere in the middle at a more uniform volume level. This makes the guitar sound louder at the same amp volume.
Compressors allow you to adjust the sustain of the sound letting notes or chords ring out evenly and consistently longer with a few different controls. The threshold of a compressor gauges the volume of the guitar where the compression will start affecting the signal of the guitar. The attack determines how long it takes for the threshold to be reached. The release of a compressor is the opposite of the attack and determines how long the compression is held or fades out. Ratio settings determine the amount of compression that will be used on the guitar’s signal.