It's quite easy! :-) You unlock the QR code machine by talking to Sable (located at the Able Sisters' shop. she's the brown porcupine sitting in the back!) for ten days in a row. Eventually, once it's unlocked, you can walk up to it. Proceed to press the A button! She'll explain a little about it and allow you to use it. She'll ask you to replace one of your current designs by a new design. Then all you have to do is line your camera up with your desired QR code.