To clear up any confusion, Pokémon HeartGold (HG) SoulSilver (SS) do not have a built-in QR code scanning feature
A common 3DS application called "FBI" allows you to scan a QR code to download and install a file (a digital game format) directly from a URL. Pokémon HeartGold CIA:
Some online databases use QR codes to represent long Action Replay or GameShark cheat codes. For example, a "Wild Modifier" code might be 30 lines long. A website can generate a QR code that, when scanned, decodes to that text string. You then copy the decoded text and manually enter it into your Action Replay device. Again, the QR is merely a data carrier, not a direct game modifier.