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.
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. 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. 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. 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.