X can be killed using Ctrl+Alt+BackSpace, and if you hit Ctrl+Alt+F1 (or F2 through 6), you'll be dropped to a virtual console where you can type commands to kill the bad app. To switch back to the GUI, hit Ctrl+Alt+F7.
The Windows (NT) kernel is designed to reserve the notification of
this key combination to a single process: Winlogon. So, as long as the
Windows installation itself is working as it should - no third party
application can respond to this key combination (if it could, it could
present a fake logon window and keylog your password ;)
Ctrl+Alt+Del is handled at the lowest level of the OS and cannot be overridden by user-space programs. This is why Windows requires Ctrl+Alt+Del before logon - this will ensure that the keys following the Ctrl+Alt+Del be handled by Windows and not other software.
Most likely your program that hangs has completely stopped the OS from running (e.g. causing memory/graphic card trouble and so on).
Best Answer
X can be killed using Ctrl+Alt+BackSpace, and if you hit Ctrl+Alt+F1 (or F2 through 6), you'll be dropped to a virtual console where you can type commands to kill the bad app. To switch back to the GUI, hit Ctrl+Alt+F7.