When the application is hung up in a way that doesn't allow the window message pump to empty it's message queue. This can be avoided by proper use of threading, but most applications work something like this:
loop forever until application closes
{
check for windows events
do application stuff
}
When it hangs in "do application stuff", the message queue for the window backs up and the app is "not responding". Most common reason is not enough disk IO or high CPU load and /or lack of threading.