When producing music, what does a compressor do?

I don't know what a compressor does sound wise or how to use it so I was wondering if someone could fill me in. I'm pretty sure you use it for drums normally but I don't know why.
3 answers 3