First try starting up the device in "Safe Mode" and see if the problem happens in there. If it doesn't, then you have a bad app, virus, malware, etc., on the device that you need to remove to resolve the problem. If, however, it happens even in "Safe Mode", then you need to be looking at either a "Hard Reset" of the device (which will remove everything on it and start it clean) or it is a hardware issue.
To get into "Safe Mode" please do the following.
1. First turn off the phone.
2. Next press and hold "Power" until you see the manufacturers logo on the screen, then release the power button.
3. "Quickly" press "Volume Down" and hold it for few seconds until you see the message "Safe mode: ON" or something similar.
4. If you wanted disable it, simply repeat the steps above, and you should see "Safe Mode: OFF" rather than on.