Why some CDs sound way louder than others?

Some CDs sound much louder than others so that with a kind of low setting in the volumen knob of the amp the SPL coming out of the speakers gets pretty loud. OTOH with some CDs it is really necessary to crak the volumen up to get the SPL desired. Why is this? Can some one explain me this?
Several reasons
1) Level that the CD is mastered at. This can be all over the place. There is no satandard
2) Compression levels. Highly compressed material will sound louder than non compressed material
3) The type of music
Do a search for "loudness war" and you'll have plenty of answers.
It's an unfortunate practice to apply compression, such as all peaks are reduced (flattened) and then raise the overall level. Consequently, the recorded sound will lose its dynamic impact, but will sound loud. Lousy but loud...
This is done by the recording studios and not much could be done to "undo" the damage. There are some promises with playback software in computer audio, but I believe it would be much better is this thing wasn't done to begin with.
Pretty sad.
Is there a Square somewhere where we can all meet to have a friendly protest that will get the attention of all the media companies.

I hope they do not intend on ruining Hi Res blu-ray audio or other HD resolutions.
Does your player have HDCD decoding? If so, check one of your really loud CDs. If it has the HDCD logo on it, that my be the answer. I believe HDCD is recorded several db louder than a standard CD.

If not HDCD, then the previously posted answers are likely correct....
Thank you all for your responses! Very clarifiying opinions. I do have a SACD player and you are right Reubent some sound really loud compared with the regular Redbook CDs. Thanks again!