When you import a CD into iTunes, iTunes gets the information about the album from another wesbsite - Gracenote, which has nothing to do with Apple or iTunes.
Information on Gracenote is compiled by the record companies, musicians and fans. Hence, the reason the quality and standard of information can vary.
Specifically, the record companies tend to regard an album consisting of songs by one artist, but from different stages in their career, as a compilation. However, iTunes would not refer to that as a compilation. A compilation album is a collection of songs by different artists, on one album.
So Greatest Hits of "band x" may come up as a compilation when imported into iTunes. The solution for an album you are about to import is highlight the CD and select Get Info. On the pop-up that appears, make sure Compilation CD does not have a tick in the box.

For an album you have already imported, highlight the complete album and then select File/Get Info/Options and change Part of a compilation to No in the drop-down box.
