From the iTunes help file:
When you insert a CD into your computer, iTunes finds the CD’s information on the Internet and displays the song information. If songs appear as “Track 01,” “Track 02,” and so on, either you aren’t connected to the Internet or iTunes can’t find the CD’s information.
If you’re not connected to the Internet, you can import the songs anyway, and look up the CD information another time when you are connected.
iTunes looks for the names of songs and albums in the Gracenote media database on the Internet.
To look up CD information in the Gracenote media database:
Make sure you are connected to the Internet.
In iTunes, select a song or songs (hold down the Shift key to select multiple adjacent songs, or the Command key to select multiple nonadjacent songs). Be sure to select all the tracks on an album.
Choose Advanced > Get CD Track Names.
If more than one entry is found for the CD (which can occur if more than one person submitted information for the same CD to the Gracenote service), select one of the entries. If it isn’t correct, choose Advanced > Get CD Track Names again and choose the other entry. If it’s still not correct, you can edit the information yourself.
If iTunes can’t connect to the Gracenote service or if it has no information about the CD, you can enter your own song information into iTunes. You can also submit the information to Gracenote so that other people can use the information.