SharePoint Online has an abundance of document management capabilities.
You can share documents with people inside and outside your organisation, for you and your (extended) teams to collaborate on and co-author. You can invoke document versioning to enable restoring of earlier editions and log changes.
You can control the process of document editing by invoking what we call checking documents in and out. When a document is checked out by a person, only that person can edit the document – and obviously co-authoring is disabled. When the document is checked back in other people can edit the document again.
Checking documents in and out is a very powerful capability, and sometimes raises a few questions on when to use and when not. My colleagues on the Office 365 Communities has written an informative article on the topic.
Read more here