I would do a few commands to see what is the problem, and then kill it.
That will list the processes using the most memory and CPU time.
(you@yours)$ps -ef|grep (name of program you want to kill)
That will give you the numeric PID for the program in question.
(you@yours)$kill (PID from the last command)
As an example, if my firefox was hanging, I'd do top and see that firefox was eating resources. Then I'd do ps -ef|grep firefox, and I'd get a list of all the processes that had firefox in their name. Then I'd find the PID, which changes each time you use a program. If the main firefox shows a PID of 2254, then my last command would be kill 2254. If you don't have the permissions to kill the program, you may have to sudo or su to issue the kill command.
the htop program streamlines some of that, it is an enhanced top that allows you to kill process directly within it. You can find it at http://htop.sourceforge.net/