You can write messages by clicking the blue mailbox in the menu bar.
It works just like any other e-mail client. If you receive a message, you'll notice a big, yellow exclamation mark on the mail.
Messages that are exchanged via the game are called IGMs (in-game messages).
Please note that your fellow players don't want to be spammed.