If you're actively editing a file when someone else deletes it, you'll see a message explaining that you no longer have access to the file, or in some cases, telling you to save a copy of the document so you won't lose work.
Example of the error message in Word:
Example of the error message in Word on the web:
Example of the error message in Visio on the web:
To save your work, you'll need to save a copy of the file.
If the deletion was a mistake, you can restore the file from the recycle bin of the site or restore from the OneDrive where it was deleted from.