The Hackszine blog offers a command line tip for stopping unruly CPU-hungry processes from making your Mac run too hot for too long:

Just open a terminal window and type top -u.... Scribble down the process ID of the (runaway) app, type "q" to exit top, and force the application to quit by typing kill -9 1047, where 1047 is the troublesome process ID.

Of course, you shouldn't be killing processes all willy-nilly on your Mac. For a consistently troublesome app, look up what software is associated with the always-ravenous, out-of-control process and uninstall or upgrade to truly solve the problem. — Gina Trapani