How does wiki handle two editors at once?

What happens when two people have an article open at the same time to edit it?

I know the latest version of WP fixed some issues for that on the dashboard. Right now, we aren't getting any kind of indication that another person is editing the article - this might be something worth looking into. Meanwhile, what does wiki do when this happens and whose version of the article gets saved, the last person of the concurrent users to hit the save button?