Ah, I got it now. So the sound is not changing in volume per se, just kinda waving in and out.
Yeah, what happens normally is this:
The constant sounds (open guitars, bass, vocals) play at a fairly consistent level
Some percussive element (normally the kick, but sometimes the snare or palm-muted guitars) is significantly louder than the constant sounds.
When you run the whole thing through a compressor, the peaks from that percussive element get squeezed down in volume - and all the constant sounds get reduced with it. The more gain reduction on the compressor, and the higher the ratio, the more noticeable it is.
So when you listen to it, that percussive element sounds the same volume the whole time, but everything else is one volume most of the time, then gets noticeably reduced when the percussive element plays, then goes back afterwards - giving the sense of someone rhythmically pulling down the volume then pushing it back up.
In music lacking dynamics, it can be used to give a sense of groove and intensity (normally referred to as "breathing") - hence being popular in dance music where there's very little actually going on musically. You have to be careful if you try to use it as an effect though, as it's very easy to over do, and it's really tiring to listen to.
Steve