You can use iCloud or iTunes to restore iPhone from a backup.

Restore from an iCloud backup. Reset iPhone to erase all content and settings, then choose Restore from a Backup and sign in to iCloud in Setup Assistant. 

Restore from an iTunes backup. Connect iPhone to the computer you normally sync with, select iPhone in the iTunes window, then 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.