You can perform two types of resets on the iPhone: a software reset or a hardware reset. Both types of reset can result in lost data, so try restarting the device before performing a reset. If restarting the iPhone doesn't fix the problem, proceed with one of the reset methods.
If your iPhone is still operational, you can perform a software reset to reset its settings. To do this, tap the "Settings" icon on the home screen, tap "General" and then tap "Reset." On this screen you are presented with a series of options that enabe you to reset all content on the device or only certain settings. Select the type of reset you want to perform. If you select "Erase All Content and Settings," the device will resort to its factory state and you will lose all apps and data and therefore have to go through the process of setting up the device from scratch.
If the phone is frozen or a technical issue is preventing you from accessing the Settings app, you must perform a hardware reset of the device. To do this, press and hold the "Home" button and "Sleep/Wake" buttons simultaneously until you see the Apple logo appear on your screen. You will need to hold the two buttons for about ten seconds before the logo will appear; release the buttons when you see the logo and the iPhone will automatically reset itself.
Information in this article applies to iPhones running the iOS 7.1 operating system and may vary slightly or significantly with other versions.