Compression is a powerful tool to help you get the best possible sound out of your mixes.
Compression is used as an automatic volume control, and is usually used to reduce runaway transients with too much amplitude for their own good. However, there are several more interesting ways to use compression as well (Phil Moffa has an awesome post on using compression in “side-chaining”, and electronic musician has a great post on using compression creatively).
There are several things that all compressors use to function:
Threshold- The threshold is the chosen dB level after which all gain will be reduced
Ratio- The ratio is how “harsh” the compression will be. 2:1 is mild compression, 20:1 is severe and moving into limiter territory.
Knee- At the threshold, how linear vs. curved the compression will be is called the knee (think of the bending of a knee!).
Attack/Release- How quickly the compression happens and ends.
Compression takes time to master, and it takes listening to lots of mixes before you can get a handle on it. Also, it takes a keen ear to hear what needs extensive compression and what doesn’t need any compression (for example, a solo piano performance probably needs little to no compression, so as to capture all of the dynamic subtleties of the performance, while rap vocals are usually compressed much more aggressively).
So, use your ear, practice, and good results will follow.