How is a blockchain split resolved? Let's say two miners created 2 different blocks and broadcast them into the network. Now some clients see blockchain 1 and other blockchain 2 which are different from each other.
I would like to understand technically as possible how in the end the majority of clients will continue with only single chain and the other be abandoned?
Why will they choose one over the other?
I would like to believe this is done automatically by the clients / miners without human touch, only by some kind of coded logic. That logic is what I'm after.    

Related question: What happens to extinct blockchains, and transactions inside of them?
You're looking for CBlockIndexWorkComparator, which operates by three rules. The rules are applied one at a time, and if a rule leads to a tie, then the next rule is applied.


Which blockchain has the most work? 
Which one was received first? (This can be different for different clients, which is why the previous rule is applied first.)
Which one has a larger pointer address? (This is largely random, and different for different clients.)