Move your iTunes library to a new computer
In most cases you simply need to copy the entire iTunes folder from your old computer into the user's music folder of the new computer, then deauthorize the old computer if you no longer wish to access protected iTunes content on it.
This approach works well as long as your library is in the usual layout where all of the media connected to the iTunes library is inside the iTunes Media folder, which in turn is inside the iTunes folder holding the library database file. If your library is not in this standard shape, perhaps because you've placed the media folder on a different drive, or have added media from various different locations without making copies in the media folder, then you either need to copy each of the components of the library to matching paths on the new computer or see Make a split library portable for advice on manipulating the library into a portable layout that can be copied to a new location without breaking the links to the media.
You can copy your library over a network share, or copy it to an external drive, move the drive between computers, then copy it into the new computer. However a better approach is to maintain a regular backup of the iTunes library, update the backup when you want to switch computers, restore the library to the new machine, then regularly maintain the backup going forward. See Backup your iTunes for Windows library with SyncToy for a suggested backup strategy. Backing up the library in this fashion ensures you have a working clone of the library on an external drive that you can connect to at any time if needed.
A portable library can be copied or restored to a location other than the standard user's music folder, which is probably the best approach if your computer has a small SSD system drive. If you want to place your library on a different path, typically the root of a drive, then press and hold down shift (Win) or option (Mac) as you start iTunes to get the option to create or choose a new library, select choose, then browse to the folder that contains your library and select the iTunes Library.itl file inside. See Open a different iTunes Library file or create a new one - Apple Support for details.
If you think that you've moved your library correctly but cannot see your expected content when you open the library see Empty/corrupt iTunes library after upgrade/crash. If you have difficulty updating content see Repair security permissions for iTunes for Windows or Repair security permissions for iTunes for Mac as appropriate.
As long as you move the library properly any devices that you have will sync with it as if nothing has changed. Note however that if you have iOS devices and haven't moved your contacts and calendar items across to your new computer then you should create one dummy entry of each in your new profile and iTunes should merge the existing data from the device. Otherwise the data on your device may be replaced with the empty lists from the computer.
You don't generally need to copy over your iOS device backups if your devices are working normally as fresh backups will be made during the first sync on the new computer. If you still wish to keep your old backup sets for any reason, e.g. moving backup data from a Vista or XP system to restore to an iOS 10 or later device in a newer version of iTunes, then see Locate backups of your iPhone, iPad, and iPod touch - Apple Support for information on the folder you need to copy across. See Relocate iOS device backups if you want to move the backup data from the system drive for reasons of space.
Should you be in the unfortunate position where you have replaced your computer and are no longer able to access your original library or a backup of it then then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data.
See also How to move your iTunes library to a new computer - Apple Support for Apple's approach to this topic.