There are a few issues here.
First, the screen appears to be not sitting properly. Has the phone been dropped and does the housing have any visible damage (bent corners)? I ask this first as it may explain why your phone is always rebooting.
For the rebooting, it could be your battery is no longer holding a charge or perhaps the connector got knocked loose. You may also have some logic board damage but we must first eliminate the simpler stuff.
I would open up the phone and inspect for any obvious signs of damage or partial connections. Use this guide. Then I would replace the battery with a high quality replacement (like iFixit) to see if that solves your problem. You could also have an issue with the Lightning port but that is less frequent. If neither of those solutions help, then you may have a logic board issue. A good repair shop should be able to troubleshoot the problem or you can come back here with more details,.