http://www.newmaconline.com/how-to-transfer-your-itunes-library-onto-your-new-os/
1) Copy your entire iTunes directory over to your Mac, leaving the entire structure in tact.
2) Launch iTunes holding down the Option key.
3) iTunes will ask if you want to create a new library or open another. Tell it to open the iTunes directory you just copied over to the Mac from the PC.
If you didn't have iTunes manage your files (big mistake by the way), you'll want to consolidate your library before copying it over to the Mac...go to File->Library->Organize Library.
This also works going from Mac to PC (ALT key) or Mac to Mac, or PC to PC.
Unlike the instructions in the Infographic, this will transfer *everything*...your playlists, your ratings, artwork, all metadata. There will be no difference and no duplicates.
One major caveat:
This creates a *new* library on your Mac (or PC). It won't merge libraries. If you need to merge libraries, I'd recommend first transferring the library to the new computer, setting it up as a new library, and then exporting the playlists you want and importing them into the library you want to merge into. Go from the smaller library to the larger library when you export/import.
ProTip:
If you've got an external drive, you can use it for iTunes and take it to any Mac or PC with iTunes. Just connect the drive and as you launch iTunes choose the library on it (hold down the Option or Alt key). Consider getting a 2.5" Portable USB drive that doesn't require a power cable, and format it as FAT32. You'll probably want to format it as FAT32 on the Mac, because Windows limits the capacity of any one partition to a lower level than the Mac will...but it will still work just