There are a few ways to use compressors. One way is an always on kind of approach blended with an uncompressed track. This can be ok if you are wanting to reduce the dynamic range. Usually this gets a low threshold and long release. This tends to increase noise some.
The other way is to basically quickly bring up the volume of a sound like a snare hit right after the hit them let it fade down fast to avoid noise. This helps slightly lengthen the hit and give the feeling that it is louder than it is without increasing noise the rest of the time.
Most guitar players fall closer to the always on than snare type setting.
There are lots of other ways to use compressors. This is a huge generalization, but it might help you.