There could be a few solutions, depending on the problem:
1. You got stuck in a chat channel, do /g to return to global chat.
2. You have Minecraft Chat turned to commands only or hidden (this is the most common problem): Press Escape, Options, Chat Settings, then turn Chat to shown.
If neither of the above solve it, we would need additional information to help troubleshoot it.