It depends where they got the songs from as to whether you can copy off a friends ipod. Chances are you can. But for your own music, if you have simply copied from cd (or downloaded), then it's as simple as copying to your ipod and then to your new computer. There are no restrictions on the files.
If you've purchased the music in the itunes store, then there are restrictions in place. As far as I know, you can copy the music, but when you try to play it it will ask for your itunes store account details. This will be used to verify you are the owner of the music. Once you've entered that the music will play fine. There is a limit on the number of computers you can register with your itunes account, i think it's 5. Since you're on your second its not a problem.