Quick way to set up a compressor:
Set Attack to fastest
Set Threshold to lowest
Set ratio to highest
Set Release to fastest
You should now hear the maximum squashing effect, and probably a lot of damage to your sound. But this is just the starting point - at least you know it's working.
Attack - the longer the attack, the more of the 'stick' part of the drum comes through before the compression pushes down. Adjust to taste - this is how you get 'punch' - you are basically re-shaping the envelope of the sound.
Release - the end of the envelope. You want the compression to have released fully before the next hit. Or, you want the compression to flow with the groove.
Adjusting attack and release is difficult if you can't hear what's going on - which is why I recommend doing these first while the compression is maximised.
Ratio - decrease this until you get the effect you want without obvious squashing or damage - unless that's what you want of course.
Threshold - with the lowest threshold, the whole sound is compressed. Maybe you only want to control the very loudest peaks only - and leave the other stuff alone. Raising the threshold adjusts how much of the sound actually gets compressed.
Low ratio's don't achieve much unless you have a low threshold. This is more of a overall compression effect.
High ratios can be very excessive unless the threshold is higher. This is more of a limiting effect.
IMO - with drum machine sounds, they have already been limited and shouldn't need a limiter. They are probably compressed too.