How The Heck Do QR Codes Work?

How black-and-white squares encode URLs, error-correct themselves, and survive coffee stains.