compression is basically making certain parts of a sound quieter, and other parts louder.
The majority of the loudness from a kick (its decibel output) comes from it's bass (the thump of the kick). if you increase or decrease the volume of a kick, you're equally increasing/decreasing the loudness of both the transient (the high end, slappy/punchy part of the kick) and the low end, thumpy part of the kick.
But what if you could increase the snappy, punchy part and not the lower part?
Compression is just a fancy term used to describe very fast volume automation. That's what compression is used for. To create the ILLUSION that something sounds louder than it actually is. You're reducing the volume distance between the snap and the thud in the kick.
So in effect, you're 'averaging out' the overall volume of the kick, So its more consistent - and hits harder (without increasing its overall DB output!)
I'd recommend watching tutorials on this. What DAW do you use?