Files associated with Office 365 apps like Word, Excel, and PowerPoint can be opened and edited online when you click the file name in a document library. When you edit in Office 365, all changes are automatically saved.
When you have a desktop app such as Word, it will show up when you open or edit the file. If you choose a desktop app, the document will open in the app and you can edit it like any other file. Unlike the online version of Word, Excel, or PowerPoint, you need to explicitly save the document before you exit to keep changes.