Someone scans the code at your stall and two seconds later your phone buzzes. What actually happened in those two seconds is more interesting than it looks.
Step one is optics, not magic. The camera grabs frames, and software hunts for the three finder squares in the corners to figure out how the code is rotated and scaled. Then it reads the modules row by row and rebuilds a string of characters. Until this moment nothing knows anything about crypto. It is plain text recovery.
Step two is reading the first characters. If the string starts with bitcoin: or litecoin:, the phone already knows which app to hand it to, the way mailto: opens your email client. A bare address with no prefix is the harder case: your wallet has to recognize the format, and that is why every chain picked distinctive shapes. An address starting with T can only be TRON, 0x can only be an EVM chain, bc1 can only be Bitcoin SegWit. The prefix is a type label with a checksum welded underneath.
Step three is the checksum. Before your wallet shows you any numbers it re-computes what the last characters of that address should be. Base58Check re-runs a double hash over the payload. Bech32 runs a polynomial over the character values. EIP-55 compares each letter's case against a Keccak hash. If the math doesn't agree, you get a warning instead of a payment screen, and that warning is the difference between a fat-fingered send and a lost one.
Step four, if the code was a payment link, is filling in the rest: amount, sometimes a label. That's where the money becomes definite. A bare-address code leaves the amount to be typed by hand, which is fine, it just means the human is still the last check.
The whole pipeline is offline arithmetic. Nothing asked a server whether the address exists. That's why a printed QR keeps working for years and why a generator that verifies checksums, like this one does before it draws, saves you a walk to the blockchain explorer later.