Locking a document is a safety mechanism to prevent documents from being deleted inadvertently. When an online document is locked, it can neither be deleted or overwritten by another file with the same name, extension and version number. On the other hand, when an online document is unlocked, it will be overwritten if a user uploads another file with the same name, extension and version number.
By default, when a document is uploaded, it is unlocked.