My keyboard has been freezing up on me. Sometimes it vanishes. I have to swipe (delete) the messages app from the background apps. (the app switcher) Double tap the home button and find the messages app. Swipe it up to delete. If that doesn't work, do a hard reset. Hard Reset
Hold the top power/sleep button and the home button at the same time until the Apple logo appears, then release.
Sent from my ancient but trustworthy iPhone 5