Compression is a little hard to understand. Basicly it is a way to "squeeze" the signal. Imagine a wave with a lot of different dynamics, lots of small and medium "hills" intermixed with tall "mountains", all are mirrored around a center line. The center line is the base. Squeezing the signal brings everything in toward that base line, effectively reducing the differences in size of the mountains and hills. You set the threshold to tell the compressor when to start squeezing. A high threshold will squeeze almost anything whereas a low threshold only squeezes if the volume gets to a certain level. If the wave is not touched its ratio is 1:1. 1:2 squeezes it to half its original size. The more you squeeze, the flatter and quieter the wave gets. 1:3, 1:4 and so on.
How is this helpful? When you squeeze it, you're reducing the differences in dynamics. Harder hits are now closer in volume to softer hits and vice versa.
Now this is where the compressors output adjustment comes into play. When you raise the output level, the wave gets bigger again. Because its been squeezed, as you bring the "mountains" back to their original size, the "hills" are now MUCH larger than they originally were. This has a neat effect because now the light hits sound like your smacking the drum harder. if you have a consistancy problem in levels on bass drum or snare hits, this can even them out.
Here's the next neat thing. The percussive nature of any drum means the attack is very loud and the sustain is medium in volume and tapers off quickly. If you slow the attack on the compressor, it doesn't react quickly to the attack so its reduced in size, then the compressor starts letting signal increase where the sustain kicks in. This makes your kick or snare sound like you've smashed it. The release it how long the compression hangs on to the sustain.
The gate (if your compressor has one) is like a on/off sensor. You set the level you want before it starts letting sound through. This is helpful in reducing noise picked up by the mic/guitar/keyboard/whatever.
These are the things a compressor does, at least where drums are concerned. Now you should know what to look for when trying to hear the differences.