Buffer overrun, also known as buffer overflow, occurs when a program writes more data to a buffer than it was designed to hold, potentially leading to system crashes or vulnerabilities exploitable by attackers. It is a critical security issue that can be mitigated through techniques like bounds checking, using safe libraries, and employing modern programming languages that inherently prevent such errors.