OT...OT...OT

ok, what is a compressor?
I think I have a faint idea, but I am not sure.
Supposedly maintains a gereral "level" of sound, like lowering the very loud notes and amplifying the soft sounding ones??