If you have any iTunes Music Store purchases the transfer of purchased content from the iPod to authorised computers was introduced with iTunes 7. You'll find details in this article:
Copying iTunes Store purchases from your iPod to a computer
The transfer of content from other sources such as songs imported from CD is designed by default to be one way from iTunes to iPod. However 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. Have a look at the web pages and documentation, this is just a small selection of what's available, they are generally quite straightforward. You can read reviews and comparisons of some of them here:
Wired News - Rescue Your Stranded Tunes
Comparison of iPod managers
TuneJack Windows Only
iPod2PC Windows Only
iGadget Windows Only
iDump Windows Only
SharePod Windows Only
iPodRip Mac & Windows
YamiPod Mac and Windows
Music Rescue Mac & Windows
iPodCopy Mac and Windows
iRepo Mac & Windows (iPhone and iPod Touch compatible)
iPod Access Mac & Windows (iPhone and iPod Touch compatible)
There is also a manual method of accessing the iPod's hard drive and copying songs back to iTunes on Windows or a Mac. The procedure is a bit involved and won't recover playlists but if you're interested it's available at this link:
Two-way Street: Moving Music Off the iPod