Music is intended to go one way: from your computer to the iPod. Going the other way is contrary to the design and is not trivial.
If you had a Mac and its hard disk failed, you would use Time Machine to restore its contents to a replacement disk. A disk failure would be a non-event.
See this old post: https://discussions.apple.com/thread/2452022
Since it is so dated some of the links may not work.
iTunes will only give you the option to copy your iTunes Store purchases directly from an iPod to the computer, you'll find details in this article: Copying iTunes Store purchases from your iPod or iPhone to a computer
For everything else (music from CDs, other downloads etc) there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. You'll find that they have varying degrees of functionality and some will transfer movies, videos, photos, podcasts and games as well. You can read reviews and comparisons of some of them here:
iTunes & iPod software
Wired News - Rescue Your Stranded Tunes
Comparison of iPod managers
A selection of iPod to iTunes utilities:
TuneJack Windows Only (iPhone and iPod Touch compatible)
SharePod Windows Only (iPhone and iPod Touch compatible)
iPod2PC Windows Only
iDump Windows Only
YamiPod Mac and Windows
iPod Music Liberator Mac & Windows
Floola Mac & Windows
iPodRip Mac & Windows (iPhone and iPod Touch compatible)
iPod Music Liberator Mac & Windows (iPhone and iPod Touch compatible)
Music Rescue Mac & Windows (iPhone and iPod Touch compatible)
iGadget Mac & Windows (iPhone and iPod Touch compatible)
iRepo Mac & Windows (iPhone and iPod Touch compatible)
iPod Access Mac & Windows (iPhone and iPod Touch compatible)
TouchCopy Mac & Windows (iPhone and iPod Touch compatible)
There's also a manual method of copying songs from your iPod to a Mac or PC. The procedure is a bit involved and won't recover playlists but if you're interested it's available on page 2 at this link: Copying Content from your iPod to your Computer - The Definitive Guide
The following does not apply to the iPod Touch:
+1 on John's fine post. I would add:
BACK UP YOUR MUSIC TO AN EXTERNAL HARD DRIVE!!!!!!!!!
I keep a copy of my music on my main computer, on a 750GB USB 2.0 external hard drive, and a third copy on my home file server that has the 1TB drives in a RAID 1 (mirrored) configuration.
When a main hard drive fails, it's a trivial though time comsuming process to restore all my music to an iTunes library. My library of songs (16,000+) is 123GB. Only about 70 songs were prurchased through iTunes or Amazon; the rest I ripped from my CDs.
It will take about 2.5 hours to copy 120GB of music to an external USB 2.0 hard drive depending on the speed of your CPU.
I start my backup at the end of the day when I'm done working and the back up runs while I'm sleeping. In the morning all is well.
My home server is a very modest old AMD CPU 1.8 GHz with 2 GB RAM running Windows Server 2000. It has four 1 TB SATA drives in mirrored pairs. The second pair is a hot back up for the first pair. This means I have FOUR hard drives with my data on it and I can pull any one of them and get the data off it if the server OS hard drive crashes.