How does a double spend get resolved when two miners find conflicting blocks at the same time? I was trying to learn about Bitcoin and its flow. Actually, I was stuck how the control flows in solving the double spend.

For eg. if Ta and Tb are a double spend of the same transaction with different outputs. These two transactions can flow through different path in the network, and assume flow in exactly opposite path. So Ta reaches miner Ma who creates a block and Tb reaches another miner Mb. Now, Ma may solve the block with Ta and Mb with Tb. Both start broadcasting the respective blocks with Ta and Tb to be a part of block chain. 

After some time in relay some node may get both transactions and find its invalid but here already the block are relayed.
What happens in such a case and how is the double spend resolved?
Blocks form a chain; each block contains a prev field containing the hash of the block that "precedes" it.  The two blocks Ma and Mb are incompatible (the block chain is not allowed to contain two conflicting transactions), so neither can precede the other.  Hence they must be a "fork"; two different blocks with the same common ancestor.  All other miners will have to decide which fork they want to mine on; e.g. whether they want to create a block whose prev field points to Ma or Mb's block.  It doesn't really matter in this case. 

Say the next block is found by Mc and points to the Ma block.  Then the chain ending in Mc is longer, and the next miner will prefer to mine on that side of the fork.    After a few more iterations, it should be clear that the chain including Ma (which has transaction Ta) is longer, and will be preferred by miners from then on.  This means transaction Tb is now dead.  (Moreover, Mb doesn't get to collect their 12.5 BTC block reward, because the block that awards it only exists on a side chain which is dead.)