The process of performing a hard reset varies depending on which model iPhone you have:
When your iPhone crashes, freezes, or gets stuck on a spinning wheel, a hard reset can get it to turn back on.
A hard reset forces your iPhone to quickly turn off and back on.