Have a preist near you? If so, a good exorcism does a possessed iPhone allot of good. Don't forget to tip the priest after the demon is exorcised and stay away from steep staircases and girls named Regan. The power of the iPhone (and Christ) may compel you.
If you want to go the lazy route, I would reset the phone by holding the sleep button and the home button till you see the apple logo on start up. If that doesn't work then you may wish to think about the priest again.
Last resort may be restoring and setting up new depending upon what iPhone model it is. Don't try and restore it yet till you post about what kind of iPhone it is and what iOS version you are running.