OK, quick lecture.....
Human hearing= 20hz to 20Khz (varies slightly)
Sample rate for CD=44.1Khz which yields a maximum frequency response of 19.98Khz under Nyquists Theorem.
So, no standard CD will producer frequencies above the range of human hearing.
This is obviously mitigated downwards by your delivery system.
The problem is that the tone of sound is affected by frequencies we cannot hear, it's called intermodulation. So "CD quality sound" isn't actually perfect at all, certainly I can hear the difference between an analog master and a CD. In fact all CD systems have a filter at 20K to remove the artifacts caused by the frequency of the wave approaching the frequency of the sample base, this is called aliasing.
Analog recording preserves some of the frequencies above 20K, and this is one of the reasons a lot of "audiophiles" like the sound of analog above the sound of digital, simply put, digital audio isn't as complex.
Lossy audio codecs remove frequencies they deem we won't hear in the mix, which changes the sound, lossless codecs seek to preserve the quality of the sound at the expense of the filesize.
The difference you hear between any lossy codec (MP3, AAC etc.) and Lossless is very real and a function of the mathematics. The term "lossless" itself is based on the delivery of identical waveform after encoding, no lossy codec will produce an identical waveform.
The iPod produces frequencies that match the quality of Red-book CD, if you attach decent headphones and play aiff files, it'll sound as good as a decent-ish CD player, but it won't sound as good as a Cambridge Audio or a Naim top-spec CD player.
All digital is not equal.
The real problem has been mentioned, that is environment, the quality of the audio is seriously degraded by environmental sound contamination, the best headphones in the world sound crap on an underground tube train where the ambient noise threshold is 80-100db.
So it depends where you listen to your iPod, and the codec you choose will only affect your listening pleasure in an environment that is quiet enough to hear the difference.
The ipod will never sound as good as a decent separates system, it can't, however it probably doesn't matter to the 95% of users who have no idea how audio actually works.
For the record, I have a mixture of 320Kbps AAC and Apple lossless files on my iPod and a pair of Sennhiesser MX550 earbuds, I listen on the train most days, and then through good systems at work or home.