Compressors are interesting because part of their goal is to be subtle. The basic idea of compressors is control over volume. Many instruments pick up different colors of sound when they are played loud, especially the human voice. Musicians often want to take advantage of this palette of colors in their music, but there's a challenge. If you have multiple players in a band, they have to pay attention to their relative volumes. Likewise, if you are playing a song which has louds and softs, they all have to fit in a dynamic range. This can be particularly difficult if music is to be recorded and played in noisy areas later, an issue well known by anyone who listens to classical music in a car.
The implementation is simple. When the volume reaches a threshold, circuitry begins to "limit" it by decreasing the volume. This happens relatively quickly (on the order of a few ms, so on the order of a few cycles of a 1kHz tone), the actual rate being defined by an input on the compressor called the "attack." Likewise there is a corresponding "release" which says how fast the compressor returns to normal volumes.
One of the nice things about compression is that it retains much of the underlying sound color. This gives you control over the dynamics while giving the musician control over the tone. However, it isn't perfect. The effect is similar to multiplying the signal by a "volume" channel, which means in frequency space the effect is a convolution. This smears the frequencies in the input a bit. If you're listening to try to detect the sound of a compressor, this smearing is the audible effect. Depending on your settings it may be a major or a minor player in the final sound.
One of the most common things that is compressed is a voice. This has two effects. One is that it gives the musician access to a larger volume range, and thus the unique sounds that come from the human voice as it changes volume, but frees them from having too much actual dynamic range change. The other is that that smearing effect makes the vocals feel a bit fuller, like reverb does. Whether you want this depends on your music. Most rock bands will compress the vocals, while an opera singer may seek a compression-free sound so that the clarity of their voice shines through.