In more detail
It comes in versions 1 to 40, from 21 × 21 to 177 × 177 modules (each version adds 4 modules per side), and four error-correction levels, L, M, Q and H, recovering about 7%, 15%, 25% or 30% of damage. The data is stored in the densest mode that fits: numeric, alphanumeric (digits, upper-case letters and a few symbols), bytes or kanji. Three large corner squares let a camera find and straighten the code, and a blank quiet zone of 4 modules should surround it. Version 40 at level L holds up to 7,089 digits. See How QR Codes and Barcodes Work.
Why it matters
More data or a higher error-correction level means more, smaller modules, so long URLs need a bigger print to scan reliably. Level H is what allows a logo to cover part of the code. Because people cannot read a QR code before scanning it, fake codes stuck over real ones are used for phishing: check the address the phone shows before opening it.
Example
HELLO WORLD uses alphanumeric mode and fits version 1 (21 × 21) at levels L, M and Q; at level H it needs version 2 (25 × 25). The 24-character URL https://example.com/menu needs version 2 at levels L and M and version 3 (29 × 29) at Q and H.