Open iTunes on the Mac or PC that you used to back up your device.
Connect your device to your computer with a USB cable. If a message asks for your device passcode or to Trust This Computer, follow the onscreen steps. If you forgot your passcode, you will have to put your phone into recovery mode & restore your phone to get past it.
Select your iPhone, iPad, or iPod touch when it appears in iTunes.
Look at the date and size of each backup and pick the most relevant.
Click Restore and wait for the restore time to finish. If asked, enter the password for your encrypted backup.
Keep your device connected after it restarts and wait for it to sync with your computer. You can disconnect after the sync finishes.
Restore your device from an iCloud backup
Turn on your device. You should see a Hello screen. If you already set up your device, you need to erase all of its content before you can use these steps to restore from your backup.
Follow the onscreen setup steps until you reach the Apps & Data screen, then tap Restore from iCloud Backup.
Sign in to iCloud with your Apple ID.
Choose a backup. Look at the date and size of each and pick the most relevant. After you choose, the transfer starts.
When asked, sign in to your Apple ID account to restore your apps and purchases (If you’ve purchased iTunes or App Store content using multiple Apple IDs, you’ll be asked to sign in to each). If you can’t remember your password, you can tap Skip this Step and sign in later.
Stay connected and wait for a progress bar to appear and complete. Depending on the size of the backup and the network speed, the progress bar might need a few minutes to an hour to complete. If you disconnect from Wi-Fi too soon, the progress will pause until you reconnect.
Now you can finish setup and enjoy your device. Content like your apps, photos, music, and other information will continue to restore in the background for the next several hours or days, depending on the amount of information there is. Try to connect often to Wi-Fi and power to let the process complete.