You have two main options:
1)
if your music can fit on one or a few CDs or DVDs, then (assuming you're using windows), just copy everything in the C:\Documents and Settings\[username]\My Documents\My Music\iTunes folder onto a DVD.
then on new machine, install iTunes and then copy all the stuff across onto the new machine in the same place. unopn opening iTunes, all your stuff should still be there. if it is, you can happily connect your iPod, it'll ask if you want to connect it with the new machine; just click yes and it'll set itself up.
2)
if you have a load of music that will take several DVDs and you really can't be bothered with all that stuff, you can try yamipod:
http://www.yamipod.com/main/modules/home/
this will let you copy stuff straight from your iPod onto the new computer. however, i'm not so sure how well it handles the stuff you've bought from the iTunes music store (that's apple's fault, not yamipod's).