Settings > Back up and reset > Factory data reset > Reset device > Erase everything.
Please remember to back up any data you want to keep first!
Alternatively, you can type in *2767*3855# on the key pad and that will do the same thing.
Remember sometimes you don't need to go even this far to solve problems. First of all try just turning your phone off for a while, or removing the battery entirely. Sometimes something as simple as that is enough to clear up some simple problems.
But if you've tried all of these methods and are still having problems, you can try a Hard Reset, the instructions for which are here.
Forum Rules - Recommended for new AndroidPIT members! Important to all community members: please read before posting