Memory corruption occurs when a program unintentionally modifies memory, leading to unpredictable behavior, crashes, or security vulnerabilities. It often results from programming errors like buffer overflows, use-after-free, or race conditions, and can be exploited by attackers to execute arbitrary code.