How does one know which of the two blocks is accepted by 51%?
Every node keeps track of all valid blocks they receive from the network. This let's them track the height of all chains, and decide which is the longest that they have (the main chain). You don't need to know which was accepted by 51%, you just know which of the 2 was referenced by the next block mined, because its likely they the majority would find the next block first and therefore have mined on top of the one they accepted.
What prevents two blocks to be accepted by 50/50?
There's nothing really guaranteed about the number 51% anyway, its just more likely for 51% of mining power to find the next block than the 49% (probability). If it was 50/50, it would just be a race, one would still find a new block first, that chain would be extended, and the rest of the miners would come and join the chain, leaving the old chain behind. Its highly unlikely for both to find a new block within a short time of each other, and therefore potentially extend the fork to a two block fork. Eventually the network always resolves itself though, just by probability, one will always eventually find s block quicker than the other.
At which point is it obvious that a block is orphaned?
An orphan block also refers to a block which is received before its parent, and this can be instantly decided by a node based on whether it recognises the parent hash or not. But assuming you mean orphaned = not in the main chain, this is also instantly decided by each node, the first block received is part of the chain and the other forms a secondary chain/fork. The main chain may change to the other fork though if it gets extended faster, so you can say you know for sure after a certain number of confirmations (e.g. 6), by which time it would be highly unlikely for the other chain to be extended and overtake the current main chain.