Thanks for stopping by the Apple Support Communities. From your post, I understand that the on-screen keyboard does not appear as expected in the Messages app. I'd be happy to help!
First, force close any open app, so that the keyboard isn't being accessed: How to force an app to close on your iPhone, iPad, or iPod touch - Apple Support , then restart your iPhone: Restart your iPhone, iPad, or iPod touch - Apple Support .
If you still have trouble with the keyboard after those two steps, check for iOS updates: Update your iPhone, iPad, or iPod touch - Apple Support , and if you're using a third party keyboard, check for updates on that, too (which you can find in the App Store > Updates).
Finally, if you still can't use the keyboard I would suggest backing up your iPhone ( How to back up your iPhone, iPad, and iPod touch - Apple Support ) and then reinstall your iOS software using the "Put your device in recovery mode and set it up again" section of If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support .