If your iPhone won't turn off the usual way, you can force restart it with a button combination specific to your iPhone model ...
During this process, you will see a slider to power off the iPhone ... the screen will activate once again. Using the force restart process prevents you from having to shut the iPhone down entirely, ...