SQUIDs operate based on the Josephson effect, which involves the flow of supercurrent across two superconductors separated by a thin insulating layer. When two such junctions form a closed loop, the magnetic flux passing through the loop influences the supercurrent. The resulting quantum interference effect allows for the precise measurement of magnetic fields.