CD-players have error correction built into their firmware - they're designed to cope with a degree of degradation due to damage, dirt, etc. without audible impact. Computers, however, are somewhat more exacting and lack the "real-time" error correction of CD players - therefore, extracting audio ("ripping") from a damaged/dirty CD may give more audible defects than playing it through your hi-fi. Software that's used for audio extraction typically has some degree of error detection/correction built in. iTunes' CD import functions have this as an option - in general, its a good idea to keep this turned on, and in a lot of cases this will handle minor defects within affecting the resulting files in iTunes.
For more extreme cases, there are dedicated utilities that can do a better job than iTunes - the best known for Windows users is probably Exact Audio Copy(EAC), which can be configured to apply error detection/correction capabilities that most other software lacks. Without going into too many details, EAC can attempt to read every sample on the CD multiple times, attempting to get a consistent value, and even if that's impossible use adjacent samples to generate a "best guess' for what the data should be. It also has very comprehensive logging so you can check the degree to which error correction has been applied. I've encountered examples of CDs that would not import correctly into iTunes (resulting in random clicks, pops and "diginoise" artifacts) but which I could process using EAC with far better results.
There are (at least) three ways in which you can use EAC alongside iTunes:
- extract the audio data as WAV files, import into iTunes, then use the latter's features to convert to a more usable format (ALAC for lossless, MP3 or AAC for lossy)
- extract the audio data as WAV files, use another utility to create and associate metadata (tags) and convert to a more iTunes-friendly format, then import these to iTunes
- use EAC's built-in functions (or one of the available 3rd party plugins) to convert the audio directly to MP3, AAC, etc.
The second and third options have the benefit that you don't have to deal with replicated files and library entries within iTunes (where if you convert a WAV file to AAC you end up with both in your library and have to explicitly delete the initial WAV version).