While it may not look like it, the iPhone is basically a small computer that fits in your palm or your pocket. And though it doesn't look like your desktop or laptop, just like those devices, sometimes you need to reset your iPhone to fix problems.
When the iPhone crashes, locks up in a way that prevents it from being turned off or just isn't working as it should (you'd be surprised at how many problems or strange behaviors can be solved by a simple reset) you need to reset the iPhone. Here's how to do it:
An iPhone reset or reboot should not normally remove or delete any data or settings. However, the term reset is also sometimes used to mean deleting all content from the iPhone in order to start over fresh with it and/or restoring from a back up If you read instructions that mention reseting the iPhone, make sure you know which kind of reset you'll be performing and plan (and perhaps back up!) accordingly.
Restore to Factory Settings: If you want to wipe all the data from your iPhone and start from scratch (this can solve some tough bugs and is also good if you're going to sell your iPhone), try restoring it to factory Settings
Recovery Mode: If your iPhone is stuck in a reboot loop, or won't boot past the Apple logo, try recovering it using DFU mode. - Be VERY careful with DFU mode as it will restore and wipe your iPhone including your data.