In a nutshell
Hamming codes place parity bits at the power-of-two positions (1, 2, 4, 8…), each guarding the positions whose number includes its bit. Together they encode the binary address of any single flipped bit, so after an error the failing checks form a number — the syndrome — that names the exact bit to flip back and correct.