If your iPhone isn't responding, and you're not able to power it off and then on again, you can force restart it to hopefully fix the issue.  Forcing a restart is different from a normal restart.
Upgrading your old iPhone? Here's how to wipe your phone to safeguard your data before you ship it off, and where to trade it ...