What's the difference between "balance" and "unlocked balance"? When is it different? Why is that, and for how long?
According to your wallet (not the protocol) you have to wait 10 blocks (roughly 20 minutes) before you can spend newly received xmr. The is a measure for increased untraceability.
As an example, when you send a transaction, your wallet uses one of the 'bills' it has, say 10 xmr. However, you want to pay someone only 3 xmr, so what happens then? Your wallet splits the 10 xmr into brand new 3 + 7, sends the 3 to your recipient, and 7 back to yourself. Because both the 3 and the 7 bills are brand new, you have to wait until you can spend those.
"Balance" refers to the total number of coins owned by a wallet. "Unlocked Balance" refers to the total number of coins that have been owned by the wallet long enough in order for them to be spent. Basically, the Monero wallet (like Bitcoin's wallet and others) requires a number of blocks to be mined after your transaction is received and mined into the blockchain so that your XMR is deep enough in the chain that it can't be doubled spent as part of a reorganization of the chain. Reorgs get exponentially harder with each subsequent block added on top of the one your transaction is in thx to proof of work.
Tl;Dr - Good times can be had as long as you wait a bit to make sure a transaction doesn't get reversed.