ELI5: Explain Like I'm 5

File locking

File locking is a way to keep different people or programs from changing the same file at the same time. Imagine if you and your friend started writing a story together. You both started working on the same document but you each wrote different sections at different times. If you didn't use file locking, then any changes one of you made could get mixed up with the changes the other person made and you'd end up with a jumbled mess.

File locking is like a lock with a key. When you turn the key, you lock the file so no one can change it until you unlock it. That way, you can make sure any changes you make won't get mixed up with someone else's changes and you can keep working on the same document without any mistakes.
Related topics others have asked about: