Room for a check
A stored bit can change unexpectedly. Electrical disturbances and physical faults are among the possible causes. Error-correcting code memory, often called ECC memory, stores additional check information alongside the data.
When the data is read, the system checks the relationship between the stored values and those extra bits. Certain patterns allow it to identify an error and reconstruct the intended value. The correction capability depends on the code and its implementation.
Without redundancy, a changed value may look just as valid as the original.
Protection has a boundary
Detection and correction are different capabilities. A scheme may detect a pattern it cannot repair. Common memory arrangements can correct a single changed bit within a protected word and detect some larger errors, but no general ECC label promises recovery from every possible fault.
In a hypothetical set of values with carefully chosen cross-checks, one changed value might be located. If many values change together, the clues may be insufficient.
Protection also has a location. Correction inside a memory chip does not automatically protect every connection between that chip and the processor. When evaluating an explanation, ask what is checked, which errors are covered, and what happens when correction is impossible. Those boundaries are part of the mechanism's meaning.
Further reading: Micron: an introduction to ECC memory.