Answer: when an operating system finds a fatal error that it cannot safely recover from
Explanation: "A kernel panic (sometimes abbreviated as KP) is a safety measure taken by an operating system's kernel upon detecting an internal fatal error in which it either is unable to safely recover or cannot have the system continue to run without having a much higher risk of major data loss. The term is largely specific to Unix and Unix-like systems. For Microsoft Windows operating systems the equivalent term is "Stop error", resulting in a bug check screen that presents the bug check code on a blue background in early versions of Windows (colloquially known as a "Blue Screen of Death" or BSoD), or on a green background on the Xbox One platform as well as in Windows 10 preview builds." wikipedia article on kernel panics