When two miners solve a block at the same time, all nodes in the network keep track of both, but consider the first they got notice of as the valid one. Miners keep mining as usual. When a new block is solved, the lucky miner will append it to the previous one he considered valid. Then he will broadcast that version of the chain to the rest of the nodes, who will know for certain then which previous block to keep and which to discard.
A stale or orphaned block is the one that got discarded after two blocks get mined at the same time and after the valid one is decided.
It is important to wait for more than one block to be confirmed when sending or receiving a transaction because maybe the block where your transaction is becomes a stale block. The more confirmations, the better, but usually 3 confirmations are more than enough.