Try performing a hard reset. A hard reset will restore your phone to its' factory default condition. By doing this it will prove whether you are experiencing a software or a hardware problem. If a hard reset resolves the problem it may have been a software 'glitch' which has been reset. If it doesn't you may have a hardware problem which will have to be investigated.
Before you perform a hard reset:
1. Be aware that a hard reset will erase all your downloaded apps and user data. It will restore your phone to a factory default condition. It will be like when you first bought it.
2. Backup your phone using the phone's backup feature.
3. Ensure that the battery is charged.
4. Do not perform a hard reset with the charger connected.
5. Remove the external SD Card (if any installed).
Here is a link which shows how to perform a hard reset.
Be patient a hard reset takes a few minutes to complete.
Once it has reset, check your phone to see if it performs correctly.
If it doesn't, perhaps there is a hardware problem.
If it does, perhaps the reset has resolved the problem.
Now restore your phone, with the backup you made earlier, using the phone's restore feature. Again check that the phone is performing correctly.
If it does then the reset has resolved the problem.
If it doesn't, perhaps a downloaded app is causing the problem. The trick is to find out which one.