Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
You can either try force quitting the messages app by holding down the sleep/wake button until it says "Slide to Power Off" then letting go. Then press and hold the home button until it goes back to the home screen.

If that doesn't work, try resetting the iPhone by holding both the home button and sleep/wake until the :apple: logo shows.

If the issue persists, you may have some corruption. Your only fix at that point is to restore the iPhone back to factory settings. If you do go down this road, make sure everything is synced to your computer and restore the iPhone and setup as new instead of from backup.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.