You can use iCloud or iTunes to restore iPhone from a backup.
Restore from an iCloud backup: Reset iPhone to erase all settings and information. Sign in to iCloud and choose Restore from a Backup in the Setup Assistant. See Reset.
Restore from an iTunes backup: Connect iPhone to the computer you normally sync with, select iPhone in the iTunes window, and click Restore in the Summary pane.
When the iPhone software is restored, you can either set it up as a new iPhone, or restore your music, videos, app data, and other content from a backup.
For more information about restoring iPhone software, go to support.apple.com/kb/HT1414.