Main ways to reset iPhone
A basic restart (soft reset)
1. Press and hold the Sleep/Wake button until the slider appears.
2. Drag the slider to turn your device completely off.
3. After the device turns off, press and hold the Sleep/Wake button again until you see the Apple logo.
Force restart(hard reset)
• For iPhone 7 series: Press and hold both the Sleep/Wake and Volume Down buttons for at least ten seconds, until you see the Apple logo.
• For iPhone 6s and earlier: Press and hold both the Sleep/Wake and Home buttons for at least ten seconds, until you see the Apple logo.
Go to Settings > General > Reset. Then tap Erase All Content and Settings
It can take a few minutes to completely erase your data. You might need to enter your passcode and Apple ID password before you erase all content and settings.