Here is my take:
Compression does a few things :
1)It reduces the difference between loud and quiet sounds but overall reduces the level (peaks) of the sound (so you need a makeup gain control, see below)
2)It changes the sound of audio as the compression works based on time constants which affect how the tone/transients/decay of an instrument is perceived.
Threshold : Point at which the level starts being reduced.
Ratio : How much the gain is going to be reduced (input level Vs output level)
Attack : How quick level will be reduced once threshold exceeded.
Release : How quick the level will return to previous after compression
Make up gain : overall output level control.
There are other settings such as Peak and RMS detection and Hard and Soft knee but we won't deal with those right now.
Some elements of a mix may be sticking out a little so a compressor can be used to for example even out the notes in a bass line, some higher notes may poke through the mix too loudly so a compressor can even them out. (on the source track i.e. the bass guitar)
You can change the body of an instrument and it's tone using attack and release controls you could make a snare ring a touch more/give it more body and you can artificially ehhance the decay.
I would get a decent drum loop and a few old mixes you have done and set a compressor up with 5-6 dB of gain reduction and listen very carefully to the sound of instruments as the compressor controls are moved.
TOP TIP : to hear compression working start with extreme settings :
attack 1-3ms
release - 30ms
Ratio 10:1
Thresold : try - 30dB or so
Make up gain : +10dB
Anything going through this should sound pretty weirdthe words blatty, jittery and pumpy spring to mind. (kind of musically innapropriate sounding)
Armed with the above start adjustng the controls slowly and bringing them down to more mellow setting such as:
attack 10ms and release 250ms and a ratio of 3:1 as you then raise the threshold so you have around 4-6dB of gain reduction, adjust the controls and refer to what I have listed below. This will even out the peaks and troughs in your signals, do not be afraid to use the make up gain control to increase overall output level and counteract the gain reduction (lowering of peaks) which is intrinsic as compression occurs.
In addition every compressor has a unique sound which means no 2 really sound the same which also adds to the confusion, try a standard DAW plugin in Logic or Cubase, Ableton etc etc, these will probably be pretty standard (not too smooth) and you will hear the compression more easily.
Once you discover the power of compression to effect music you will never turn back !
In all likeyhood it will take time and practice to understand what compressors are capable of doing but this should give some insight.
SafeandSound Mastering
Mastering