it requires a piece of third party software.
There are a number of pieces out there, Google for them, but I cannot recommend any particular one of them. Never had to use them.
That said, I will point you at an Apple discussion that deals with this problem:
Can anyone tell me if its possible to transfer music from my ipod to new itunes library on new computer. My old laptop died and I hadnt backed up my itunes library. I still have all music I want on my ipod and have recovered my purchased content but cant sync ipod or will lose all the content. A lot of my old library had been transferred from cds and I dont want to go through all that process again.