Move your library to another computer

There are a few ways to transfer your iTunes library from one computer to another:

Before you sell or give away a computer, don’t forget to deauthorize it (choose Account > Deauthorize Computer).

See also
Authorize a computer to play iTunes Store purchases
Download previous purchases from the iTunes Store
Save a copy of your playlists

Apple Support article: How to copy purchases between computers

Apple Support article: How to use your iPod to move your music to a new computer

Apple Support article: Moving your iTunes Media folder