This is still happening a lot in several countries, but preponderently takes place in Mexico, at gas stations. When you go to pay, the attendant will try to switch - for example - your 200 Peso note with a 20 Peso note, and then argue with you about it.
There might even be somebody who distracts your attention right when you are ready to pay, just so the discussion goes somewhere else for a minute, while he switches the banknotes. If you think it can’t happen to you, well, you just don’t pay attention.
How to avoid: when you hand him the bill, just ask if he has change for it. Make sure you mention the amount on the note. Also, keep your eyes on the note at all times.