Thanks for visiting Apple Support Communities.
If you've purchased music from iTunes, there are a few ways to get it back on your computer. This includes transferring purchases from your iPod and downloading past purchases from the iTunes Store.
This article has some good information about the available methods for transfering your media:
iTunes: Transferring media from your iPhone, iPad, iPod touch, or iPod