The following steps are intended for the Apple iPhone 5, 5c, and 5s running any iOS.
Following these steps will completely erase and delete all user added content.
Tap the Settings App
Tap General
Tap Reset
Tap Erase All Content and Settings
Tap Erase iPhone
Tap Erase iPhone to continue.
Enter Apple ID password and then tap Erase.
Once the phone has restarted, you will need to set up the phone for the first time.