The two blocks will be valid until a new miner solves the following block and attaches it to one of the two previous ones, confirming the longest chain and discarding the shorter one.
Stale blocks or orphan blocks are blocks that were dropped from the network by other longer chain.
Stale block occurs when a miner picks a chain to attach their new block, becoming this chain the larger one and dropping the shorter chain which contains the stale block.
It’s good to wait for more than one block (six is recommended), to be sure that your UTXO is not in a stale block, and it gives time to sync up the network.