The threshold knob determines the level (volume) at which the compressor starts working. If you set the threshold very high so that it's above the level of any incoming signal then the compressor will probably do nothing. If you set the threshold very low then it will always be acting on the signal.
The ratio control determines the degree of compression. 10:1 will push the level of signal down further than 2:1.
The attack knob determines how long the signal can be above the threshold before the compressor starts working. For example, if you wanted to include more of the attack of a stick hitting a snare drum then you may want to use a longer attack time. Otherwise the stick attack will sound compressed.
The release knob determines how long the compressor works after the threshold has been exceeded. A short release time will mean that the compressor stops working right away and a long release time means that it keeps working for a longer time. An example of a badly set release time is when it keeps working longer than you want it to on a vocal. Let's say you speak or sing two words in a row and the first word is too loud so you want to compress it down to the level of the second word. If you set the release too long, then the second word will be compressed and will be more quiet than you want.
You will notice on professional recordings that you don't hear levels jumping all over the place and one of the reasons is the use of compression. I recommend playing with extreme settings on all of the knobs until you can hear what they do. Start by adjusting the threshold so that you can see the gain being reduced most of the time. Then adjust the ratio all the way up and down so you can hear the effect. The attack and release are going to be a little more subtle.