How you open and edit a file in your document library depends on the type of file you have. If the file type is associated with an Office 365 application, like Word or Excel, the file can be edited online. If you have the app on your computer, you can also edit it offline.
Edit a document in a document library
The simplest way to edit a document in an Office 365 app (like Word or Excel), is to click the file.
Open the document library and click the file you want to edit.
If the file is associated with an Office 365 app, it will open online. If not, you'll get a download prompt.
Once downloaded or opened in an online app, you can edit and save the file.
When you edit online in Office 365, your files are saved automatically. If you edit a file offline, you'll need to upload it back to the library.
When you open a document with more than one app choice, such as an Office 365 file with the same app on your computer, you can choose between the two.
Open a file to edit in a document library
Open the document library and right click the file you want to edit, and then click Open.
If there are more than one app (like Word Online or Word locally), a sub menu opens. Click the app you want.
Edit the file in the online app, or offline app you chose.
When you're done using an Office 365 app, make sure the status doesn't say "Saving", and close the tab or window. If you're using an offline Office app, save the file and then close the app.
When you open a file and choose an offline app from the menu, your file is saved back to the library every time you save in the app. If you edit a file that requires you do download the document, such as Paint, you need to upload the saved file. When you upload a file with the same name as one that exists in the library, you'll get the message 1 item wasn't uploaded in the status field
Click the status field for an option to replace the original file.
If versioning is enabled in SharePoint Online and you replace a file, you aren't actually overwriting the original, but creating another version. For more info on versioning, see View the version history for a file in a document library
Check a file in or out in a document library
If the document library does not enforce check out before editing, you can edit a file without checking it out. If you want exclusive editing, or the document library requires check out first, you can check the file out before opening and editing. For more info on checking files in or out, see Check out or check in files in a document library