It is important to make sure the issue is not related to the screen timeout settings. This can be done by pressing the POWER button once after the issue occurs. If the phone screen immediately shows the same screen as before the issue occurred or the lock screen, the phone is not powering off or rebooting.
Verify that the phone is not powering off due to the battery not having enough charge, by following these steps:
Updating your phone software may also resolve the issue. Ensure the phone is fully updated, by following these steps:
NOTE: If the phone is not on the latest software versions and updates are not found when performing the above steps, the update will need to be installed using an RUU for the phone. See ROM Downloads For Your HTC Smartphone for detailed instructions.
Sometimes the issue may be caused by issues with an application. See My apps are not working.
Some developer settings can also cause the phone software to become unstable, which may result in the phone rebooting. Follow these steps to turn off developer options:
A factory data reset can also resolve some software issues. See How to factory reset a device.