As of WordPress 3.6, a new post locking feature was implemented thanks to the new Heartbeat API (also added in 3.6).
In previous versions of WordPress, any user could open a post currently being edited by another user, with only a warning displayed:
Warning displayed in versions of WordPress earlier than 3.6
As of 3.6, posts are locked during editing, preventing other users from accessing and modifying the post.
The posts listing, showing a locked post currently being edited.
If a user clicks to edit a post that's currently locked they are presented with three options in a pop-up dialog:
The "Take Over post editing" dialog
The user that has been locked out receives the following dialog, and is no longer able to edit the post.
Dialog received by current editor when another user selects to "Take Over"
As the Heartbeat API sends requests every 15 seconds, it can take up to 15 seconds for the current post editor to be notified that another user has taken over.