If you see a "QR Scanner" option in a Pokémon game menu, you are likely looking at or Generation 7 (Sun/Moon, USUM) . HeartGold lacks an in-game camera interface, so any QR code you find will require external hardware or setting changes to function.
Using QR codes to play Pokémon HeartGold is a lifesaver for fans who want to replay the Johto region without paying scalper prices. The method is elegant and fast if you already have a modded 3DS. However, the reliance on potentially unstable file-hosting links and the requirement of system modification makes it inaccessible for the casual user.