Judging from my Hardware 2.0 mailbox, a lot of iPhone and iPad owners are getting ready to give away or sell their old hardware in order to make way for a new iPhone or iPad. But before they can do that, they need to securely wipe their data.
Fortunately, Apple has made the process pretty straightforward.
1. The first step is to back up the device, because you don't want to lose any data. You can do this by connecting the iDevice to a PC or Mac with iTunes installed, or to iCloud (iOS 8 users can check the status of this at Settings > iCloud > Backup, while iOS 7 or earlier users need to go to Settings > iCloud > Storage & Backup).
2. With that done, you're now ready to wipe the device. To do that, tap Settings > General > Reset, and then choose Erase All Content and Settings.
DO NOT, whatever you do, wipe data manually, as this will delete data stored in iCloud and result in data loss.
Note: Users of iOS 7 or later who have activated Find My iPhone will need to supply the correct Apple ID and password to continue with the wipe.
3. Job done. When the device is next turned on, the Setup Assistant will guide the user through the setup process.