Well, it could be a few things.
First, I would uninstall any apps you don't use (and that can be uninstalled).
Second, scan the phone for viruses and malware. Any of those can cause issue.
Third, if the phone continues to do it, you may have to do a "Hard Reset" to clear everything off the phone and give it a clean fresh start. If that is the case you should back up your personal stuff before doing it. All personal stuff/info.
NOTE: Doing this will clear 'all' the data on your phone, so it is suggested you not choose this option unless you have to, or aren't worried about losing anything on the phone.
Be sure you back up any data you want to keep, to a computer or cloud account, before doing the reset.
To "Hard Reset" the...