If your iPhone won't turn off the usual way, you can force restart it with a button combination specific to your iPhone model ...
Revive your unresponsive iPhone by forcing it to restart. Additionally, you can try charging the phone or reinstalling iOS.