Resetting iPhone
Reset all settings: Choose General > Reset and tap Reset All Settings.
All your preferences and settings are reset. Information, such as your contacts and
calendars, and media, such as your songs and videos, are not deleted.
Erase all content and settings: Connect iPhone to your computer or a power adapter.
Choose General > Reset and tap Erase All Content and Settings.
This feature resets all settings to their defaults and permanently removes all your
information and media on your iPhone by overwriting the data stored on iPhone.
Important: You cant use iPhone while data is being overwritten. This can take one to
four hours or more, depending on the storage capacity of your iPhone.
*copied straight from the iPhone manual