system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What actually happens when a program stops responding? Why does it sometime crash and other times continue working?
gpt
Let's start off with your operating system.  That's going to be Windows, etc.  That's your overseer within the computer, and it communicates and interfaces between you and the other applications inside the computer.

Normally, the operating system (OS) is freely communicating between you and the programs, but sometimes, this communication breaks down, which is to say the program isn't responding to the OS's requests.  This can be because of a bug in the program, or because the program is busy doing its thing and doesn't bother to respond to the OS.

Sometimes, the program just needs a little time to catch up, and when it gets finished with its current task, it reestablishes communication with the OS and the program continues working.  Sometimes, however, the program gets caught up in its own thing and runs around in circles over and over again.  The program isn't going to respond.  Occasionally, but not always, the program may trigger a break command, which says that if that line of code is reached, terminate, because the program has found its way in Bad Place (TM) and won't be getting out.  That's when the program crashes; the program has triggered its own self-destruct sequence.

But sometimes, the program just sits there and waits forever.  You might tell the OS to try to close the program.  If the program still doesn't respond, you can force the program to terminate, which is to basically have the OS take a gun to the program and execute it (in the sense of taking it out back and disposing of it).