Press Y, the default all-chat key, type your message and hit Enter or Return to send it to everyone.
If you only want your own team to see it, whether you are playing as survivors or the infected, press U instead, then type and send the same way. Both keys can be rebound in the keyboard options.