If the songs were purchased by you (using your currently-used Apple ID) from the iTunes Store... Go to the main iTunes Store screen. Log in if you are not already. On the right side, find Purchased under QUICK LINKS. On the Purchased screen, click on Music and find the song(s). There is a Not on This Computer filter there that might be useful. Next to the song name, you should see a button with a cloud symbol. Click it to download that song. There is a Download All button toward the bottom right.
NOTE: If it says "Downloaded" next to a song, that means that song is already in your current iTunes library.
This way is not work for the CD ripped music and website download music. But you can follow this step by step guide to transfer all the music from iPod to iTunes, including the non-purchases songs. It's easy to understand and works pretty well for my iPod.
http://www.ipod-transfer-copy.com/how-to-transfer-music-from-ipod-to-computer-itunes.html