When you want to move data from an old Mac to a new one, the most reliable method is to use Apple's Migration Assistant. Found in the Utilities folder of your Applications folder, Migration Assistant copies all of your files from your old Mac to your new Mac, so you don't have to transfer them manually.
The first set of steps in this article assume that you have both the old Mac and the new Mac available. The second set of steps explain how to restore your data on a new Mac using a Time Machine backup, which is a slightly different process.
Before you start the data transfer process, make sure both Macs have their software up to date (System Preferences -> Software Update), and place them near each other with Wi-Fi turned on. Lastly, on your old Mac, open System Preferences -> Sharing, and make sure a name appears in the Computer Name field.
If you made a Time Machine backup of your old Mac, Migration Assistant can use that backup to restore your personal files, including your apps and everything in your user account.
If you're not keeping your old Mac and plan to give it away, sell it, or trade it in, be sure to erase the data on it and perform a factory reset.