Chain Reorganization
When nodes drop recent blocks and adopt a different competing sequence, so the transactions in the discarded blocks are undone.
Reorganizations happen naturally whenever two producers publish at the same height and the network converges on whichever branch the fork-choice rule prefers, so shallow one-block reorgs are ordinary on fast chains. Transactions in the discarded blocks usually return to the pending pool and are included again shortly afterwards, unless someone deliberately replaced them, which is the mechanism behind a double spend. Deep reorganizations are not routine and point to either an attack with majority block-production power or a client bug, as in the 2013 Bitcoin incident where two client versions disagreed about a block's validity because of an underlying database limit. Exchanges set confirmation requirements specifically to survive the reorg depth they consider plausible for a given chain.
In practice
A service that credits deposits after a single block on a chain with frequent one-block reorgs will occasionally credit a transaction that is subsequently undone.
The common misunderstanding
A reorg does not delete your coins; the affected transaction generally returns to the pending pool and can be re-included, unless it was deliberately replaced.