In Chat, choose + beside Direct messages and type someone's exact handle under Message by handle. You see who it is before you send anything. In the mobile app, it is under New message in Messages.
Someone who shares none of your teams receives your first messages as a request. Until they accept, you can send three messages and no attachments. They can Accept, Ignore or Block; you are not told if they ignore it. Requests you receive are listed under Requests, apart from your direct messages.
Who can message you, under Privacy in Account settings, decides who can start a conversation with you: Anyone (the default), People in my teams, or Nobody. Conversations you already have are not affected.