- What happens in the bitcoin network when two miners solve a block at the same time?
Each miner propagates the nodes nearest them first, so the chain forks whilst both are spreading. Another block will be solved based on one of these blocks and the PoW will increase on this specific path of the fork. This longer block will then propagate around the network to all nodes eventually. The block that was not included in this version of the chain will disappear and all the transactions in it will return to the mempool.
- What is a stale block?
This is a block that has been built on a block that has formed a fork in the blockchain (see answer to 1 question 1). This part of the fork has the lesser Proof of Work and disappears with all the transactions in all of the associated blocks returning to the mempool.
- How do stale blocks occur?
They occur when the chain forks because two (or more) miners create different, blocks at the exact same time. Other blocks then get added, but it is the chain with the greatest Proof of Work that the network takes. Stale blocks occur on the other other chain and transactions get returned to the mempool as that version of the chain disappears.
- Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
Best practice is to wait for 6 confirmations to be sure that the block with the specific transaction in it is confirmed. It is possible that due to the way the chain gets blocks added and takes time to propagate around the network, that it may, in fact be part of a fork that has the lesser Proof of Work and will disappear with the transaction (and all the other transactions on that fork of the chain) going back into the mempool.