This section will describe how AR works. The implementation differs slightly between platforms. Google's implementation is called ARCore, and Apple's implementation is called ARKit.
AR is all about superimposing computer graphics on top of a camera feed. This sounds like a simple thing to do, except that you have to track the camera position with great accuracy. Both Google and Apple have written some great application programming interfaces (APIs) to do this magic for you, with the help of motion sensors in your phone and data from the camera. The computer graphics that we add on top of the camera feed are synced to be in the same coordinate space as the surrounding real-life objects, making them appear as if they are part of the image you see on your phone.