Recovery mode allows you to update or restore your iPhone using a computer with iTunes or Finder. Here's how to access it.
If your iPhone won't turn off the usual way, you can force restart it with a button combination specific to your iPhone model ...