As promised. ECC memory uses a code called SECDED: Single-Error Correct, Double-Error Detect. To see the idea, shrink it to Hamming(7,4): 4 data bits, 3 parity bits.
Number the positions 1 to 7. Put the parity bits at positions that are powers of two (1, 2, 4) and the data at 3, 5, 6, 7:
position: 1 2 3 4 5 6 7
role: p1 p2 d1 p4 d2 d3 d4
Each parity bit covers the positions whose binary index has that bit set:
p1covers 1, 3, 5, 7p2covers 2, 3, 6, 7p4covers 4, 5, 6, 7
Each parity is chosen so its group has an even number of ones. Example: data 1011 goes in d1 d2 d3 d4, giving _ _ 1 _ 0 1 1. Positions 3, 5, 7 hold 1, 0, 1, which is already even, so p1 = 0. Positions 3, 6, 7 hold 1, 1, 1, odd, so p2 = 1. Positions 5, 6, 7 hold 0, 1, 1, even, so p4 = 0. Codeword: 0 1 1 0 0 1 1.
Now flip one bit, say position 6. Recompute the three checks over the received word. They give a 3-bit syndrome: the failing groups here are p2 and p4, so syndrome = binary 110 = 6. The syndrome is the position of the flipped bit. Flip it back. Magic, and just three XORs.
For the "DED" half, add one more overall parity bit over the entire word. A single error makes the overall parity odd and the syndrome non-zero: correct it. Two errors leave the overall parity even but the syndrome non-zero: you can tell something is wrong and cannot fix it, so you report an uncorrectable error.
Real memory scales this up: 64 data bits plus 8 check bits (72 bits per word), which is why ECC DIMMs have nine chips where non-ECC has eight.