IPhone 5 Help! Keeps pressing buttons?

I have an iPhone 5 and last night, by itself, it just started to press buttons. It would open up my calendar, then it would open up the app store. If it was locked it would go into emergency dialing and press random numbers…

If I were to describe it, it's like my iPhone is possessed.

I've tried turning off and on as well as restoring. Nothing has worked so far.

Go to the phone store and say what's happening and say I don't know what to do or ask if you can upgrade

Try turning it off then pressing the home and power button at the same time for 10secs the without letting go of the home button let go of the power button and hold it for 15 secs but make sure it is plugged in to the computer before you do anything and then do the steps and iTunes should come up with a message saying your iPhone is in dfu mode and then restore it should fix any system prop lens but if it is physical then just return it to your provider it you have a warranty other wise you may have to pay to fix it