If the phone is frozen now try this:
If your iPhone, iPad, or iPod touch won't turn on - Apple Support
Otherwise for an iPhone 7 or 7+ try holding down the Sleep/Wake button and the Volume Down button at the same time for at least ten seconds until the Apple logo appears and then allow the phone to restart.
If a restart does not help try a System Restore. First backup your device using iTunes. Also import your photos to your computer and copy all important data. Try restoring as New first and testing it. If it works then try restoring the backup and test it again. The backup could be corrupted and if so you would have to restore as new again. Here are the steps for a Restore:
https://support.apple.com/en-us/HT201252
If the above steps do not help, you may have to have it tested at an Apple store.