If your iPhone won't turn off the usual way, you can force restart it with a button combination specific to your iPhone model.
A frozen phone is a common (and frustrating) phenomenon, but there are ways to bring your device back to life. If your iPhone isn't responding, and you're not able to power it off and then on again, ...