Simply stated, a compressor makes quiet sounds louder and loud sounds quieter. The idea is to even out the loudness of a sound source; that's called reducing it's dynamic range.
Compressing the dynamic range of a recording can make an instrument sound more "even" in loudness, making it easier to mix with other instruments.
Because compression reduces the difference in loudness between the "average" loudness and the "peak" loudness by reducing the side of the "peaks", this gives the engineer an opportunity to turn up the volume of a compressed signal without distorting. In this way compression can also be used to make an instrument sound louder in average volume.
HTH,
G.
P.S. The "nephew reference relates to another thread I have going in the "Mixing/Mastering" forum
Dude, seriously, if you think you've learned enough about compression from 1 post, good for you. It does take a tremendous amount of effort to go all the way up to the search box, then type out such a loooong word. Then there's the thousands of posts you can learn from, what a hassle!
Your attitude will only hold you back.
Learn from all the replies you get, including the ones that suggest you put a tiny amount of effort in yourself.