Bitcoin,I want to transfer some Amount so I broadcast a transaction that is picked up by miners.
You broadcast a transaction which will be in the mempool of the nodes until a miner decides to include your transaction into a block.
So if my transaction get's in 2 different currently processing blocks by different miners and one of them is mined into the blockchain, the second miner's block is dropped.
Blocks are not 'mined into the blockchain'. Mining simply means to create a valid block.
If 2 blocks get mined at the same time (very uncommon, but possible), the NEXT block will decide which one is valid.
The longest chain is the actual valid blockchain.
Small example:
Miner A and miner B do mine block nr. X at the same time. They both broadcast it into the network.
A portion of the miner in the network did receive block X from A and are trying to build the next block upon this block.
Another portion of the miner did receive block X from B and are trying to build the next block upon this block.
Now, miner C (who did mine using block X from A) found a block (X+1) and shares it.
The whole network now accepts this chain (Block X from A --> Block X+1 from C) as valid chain since it is the LONGEST valid one.
Block X from miner B will get discarded by the nodes.
How does the protocol know which transactions made it and which didn't? Another way of asking, how is a transaction "marked" as mined so if it's still floating in the p2p network, miners know that this transaction is already in the blockchain.
A transaction is not 'marked' as mined. Blocks are being mined (created).
A transaction is being confirmed by being included into a block.
So, once a block is being mined which includes your transaction, it is considered as a confirmed transaction (Amount of confirmations = 1 + Number_of_blocks_mined_after_your_TX_got_included).