How does a document get Locked

Does anyone know how a document can get locked other then right clicking and selecting the Lock Document option? Could it have something to do with not exiting the form gracefully? It somehow happens automatically.

Thanks, Paul

Subject: $Writers field

With normal document locking functionality a field called $Writers is added to the document when someone puts the document in edit mode. This field contains the name of the person that has the document locked.