Limited information there , but I'll take a stab.
I had the same issue, I think. The keyboard letters would show up as usual when being tapped but nothing would type on the screen. My only two options was to restart the phone, or, what I found that seemed to work was to leave whichever app completely and go back in. Frustrating but it seemed to kickstart the keyboard again.
I also went in to Settings, Language and Input and selected Samsung Keyboard. Then, I went down to Keyboard swipe and changed the setting to None and turned off Predictive Text (which turns off the auto-correct and such). Not sure if that actually did anything but it seemed to stop the freezing up.
Apparently there are other keyboards available from the app store but I didn't go into the research there.