For this example, I'll go from a Windows machine to a Mac, but the process should work in reverse, as well.
If you want to make this easy, you'll need to move all your music into the iTunes folder. There's an easy way to do this: In iTunes go the Advanced menu and choose Consolidate library.
Sit back and chill while your music is copied. And I do mean copied. Any music not already in the iTunes folder will not be deleted. You'll just have two copies. One inside the iTunes folder and one outside.
Now quit iTunes and go to My Documents, then My Music, and you should see the iTunes folder. Now you need a place to put that folder. It could be an external drive, a network drive, or if you have a big enough iPod, use that. Whatever you use just needs to be big enough to hold all your data. Right click on the folder and choose Properties to find out how big it is.
Drag the iTunes folder and copy it to wherever you're temporarily storing it.
Go have lunch.
Then connect the storage device to the new computer. In this case a Mac.
- Install and launch iTunes. If iTunes asks to find your music say "no."
- Quit iTunes.
- Go to your Music folder.
- Move the existing iTunes folder to the trash.
- Copy the old iTunes folder off your storage device and put it where the old folder was.
- Open iTunes again.