A Telegram QR code opens a chat with your username. The username goes in without the @ — <code>t.me/@name</code> does not resolve, which is the mistake almost everyone makes typing the link by hand.
The payload is https://t.me/ plus the username, with an optional text parameter. It is an ordinary https link, so it works from any scanner and opens the app when installed or the web version when not.
Usernames are public, phone numbers are not. That is the practical advantage over WhatsApp and Telephone: you can hand out a contact route without handing out your number, and change the username later without changing your account.
Groups and channels use the same link shape. A public group or channel has a username too, so the same type points at a community rather than a person — often the more useful destination on a poster.
A code on a flyer or a venue wall that opens the group, which is a far better ask than "search for us".
A username on a product or a shopfront, revocable in a way a phone number is not.
A code that starts an automated flow, where the first message is the command that begins it.
Both sides need Telegram. Without the app it opens a web page inviting them to install it, which is a conversion step you should expect to lose people at.
No username, no link. Accounts without a public username cannot be reached this way at all.
A username can be taken or changed. If you release yours, a printed code points at whoever claims it next — a failure mode a phone number does not have.
The prefilled message is encoded into the code, so length costs density.
Anyone who scans can message you. That is the point, and it is also the spam surface. A bot or a group is easier to moderate than a personal account.