ELI5: How do QR codes work

r/

Hi all, just wondering if anyone could explain how a phone camera can interpret a QR code and extract the needed info regardless (it seems) of angle and lighting variability.