It doesn't, because it can't.
The process of editing an attachment is: download a copy, edit it locally, upload the new version. The server cannot know what is being done to a copy of the file it holds.
There are some add-ons which put a form of lock on attachments so that people can tell someone else is editing and has the intention of uploading a new copy, but there's no way to know what is happening on other machines.
Hey there Community! My name is Vannya Vallejo, the Channel Communication Specialist at Atlassian and I want to help Atlassian users like you learn about our Solution Partners and how they c...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs