Use a computer to go to
Google Play. Find a keyboard you like (I use
SwiftKey Keyboard, but choose whatever you like.) Log in with the same Google account that's on your phone and install the keyboard. It will install to your phone. (Assuming that the keyboard is gone from yo9ur phone, this should work. If the keyboard is just hung up, or something else is wrong with the phone, the keyboard will install, but it won't become the default keyboard, so you'll have to go further.
Join the Android Central community so you can respond here. We'll need at least the make and model of your phone.)