In a direct message, open Conversation Settings → Privacy & Safety and click Block. Reach the panel from the Options menu (three dots) in the chat header, or by right-clicking the chat in the sidebar.
What blocking does
Blocking stops messages in both directions, and the other person is never told: they simply see that the conversation is not accepting messages. Nothing already sent is deleted, and the person is hidden from the New Chat list so the conversation cannot be restarted around the block.
Unblocking
Only the person who set a block can lift it: click Unblock in the same panel. Messaging works again straight away.
Note: Group chats cannot be blocked; leave the group instead, from the same Conversation Settings panel.