Download and install the latest version of iTunes if you do not have it installed on your computer. Launch iTunes after it is installed and updated.
Plug your iPhone into your computer using the USB cable and click "OK" on the alert window that informs you iTunes has detected an iPhone in recovery mode.
Click on the name of your iPhone in iTunes and click the Summary tab.
Click "Restore iPhone" and then "Restore" on the alert window warning you that all your data will be erased.
Click "OK" when the restore process is complete. Monitor the progress of the restore by watching the progress bar. The restore may take some time, which is mostly due to downloading the iPhone software image. The image is a large file and the download time depends on your Internet connection speed.
Restore your iPhone data from a backup file in the "Restore from this backup" drop-down list and click "Continue." Optionally, you can set up your iPhone as a new iPhone and backup from an iCloud backup.