Apple has published a nice new video, explaining how you can set up your new iPhone by transferring your data from your previous one, and how you can prepare your previous iPhone for Apple Trade-In.
Before you sell, give away or trade in your device, you should first transfer information to your new device, then remove your personal information from your old device.
You shouldn’t manually delete your contacts, calendars, reminders, documents, photos or any other iCloud information while you’re signed in to iCloud with your Apple ID. This would delete your content from the iCloud servers and any of your devices signed in to iCloud.
To help you prepare your iPhone for Trade-In, Apple details the process of turning off Find My, and then securely erasing information from your device.
To factory reset your device:
Tap Settings > General > Transfer or Reset [Device]
Then tap Erase All Content and Settings.
If asked, enter your passcode or Apple ID password
Then confirm that you want to erase your device.
Wait for your device to erase. Depending on your device, it can take a few minutes to completely erase your data.