I can't type or text on my iPhone?

I was on Facebook (on my iPhone) when I tried to reply to someone who replied to my comment earlier, when I couldn't type anything. I pressed the place that says "reply" or something like that on Facebook but nothing happened. Then I went to text my friend about it, but I couldn't type there either. I tapped on the part you're supposed to tap on to start typing, but nothing happened. One time I somehow got the keyboard to appear so I thought I could start typing again, but the keyboard didn't do anything. So I literally can't type anything.

Hold the home and lock buttons down simultaneously for several seconds until the apple symbol shows up. This should do a basic reset. If that doesn't help update the question and I'll see where to go from there.

When i try to reply on facebook on my phone, the keyboard doesn't show up but when i press something, it types a random letter