The first and simplest solution is to restart your iPhone. I know, it sounds obvious, but trust me, it's often the most effective way to get your device up and running again. Just press and hold the sleep/wake button until the Apple logo appears, and voilà!
If restarting doesn't work, it's time to get a little more technical. Try forcing a restart by pressing and holding the sleep/wake button and the home button at the same time. This will give your iPhone a little kickstart, and it should be back to normal in no time.