On the device...
Step 1.
If you have an iCloud account active on the device you will need to delete the account before restoring.
- Tap on the Settings app
- Go to “iCloud”
- Scroll down under all the settings to find “Delete Account” or “Sign Out” and tap on that.
- Confirm the removal of the iCloud account from the device by tapping on “Delete” or “Sign Out”
Step 2.
Restore the device.
- Tap on the Settings app
- General > Reset > Erase All Content and Settings.