To get started, click the chat icon near the top right of the screen to launch the chat box, it will appear beneath the profile picture of your coauthor. If nobody else has the document open then the chat icon won't appear at all.
Once it's open, the chat is simple to use. Just type your messages--and you'll see the messages other people send as well.
This feature is available to Office 365 Subscribers only.
A few things you should know...
The chat history is not preserved, so if you close the document and reopen it later you'll be starting fresh with an empty chat. If you need more persistent discussion, consider using the comments feature instead.
In-app chat only works if you have shared the file with others and they have the document open.
In-app chat requires the file to be stored on either SharePoint Online or OneDrive for Business. OneDrive Consumer, or any other storage location, is not currently supported.
In order to chat, you (and the people you're chatting with) need to be using the latest version of Office for Windows for Office 365, Office for Mac for Office 365, or Office for the web. Older versions of Office, and Office on Android or iOS, are not currently supported.
If another person opens the file to edit it, they can join the chat too but they won't see any history of the chat from before they opened the file. They'll only see new messages as of the time they opened it.
You can minimize the chat by clicking the minimize button at the top of the chat window. If you choose to minimize the chat, you won't miss any messages. The chat bar will indicate if new messages have been received while the chat window was minimized. You can reopen the chat window to see and respond to those messages.
If you'd prefer to mute the chat window entirely, just click the x at the top right corner of the chat window to mute it. While it's muted you won't see any messages or any notifications. If you reopen the chat window later in the session, you'll see all the messages you missed while you were muted.