It refers to a no-win/no-lose situation. It does not require three participants; two is enough.
There's a 19th Century story in Mexico that illustrates the Mexican Standoff very well. Two horse carriages going in the opposite direction entered a narrow street and met halfway through. Neither could move forward, and each insisted that the other back his horse carriage up. Each sent servants for foor and water, and both stayed firm for several days, until the authorities made both of them back up.
This is when you go into a public restroom, into a stall and another person comes in and sits in the stall next to you. Neither of you drop a deuce, waiting for the other to drop first. It makes for a sometimes tense situation
Damn... I was just in the men's room and got caught in a mexican standoff. I finally got up and left. I'm going to give it another try in a few minutes.
A phrase used by sports announcers to describe a tie or draw game. Use of the term has declined in recent years probably because it is perceived as being politically incorrect and also because the rules of some sports have been modified to reduce or eliminate ties or draws.