What is solution when the machine was hang

There are about 4,567,908 reasons why your computer would hang.

Did you install something lately? Did you run a virus and spywere scan? Is it hanging in specific areas like when you go on the web or use a certain application?

What you asked is like going to a doctor and saying "how do you fix what hurts?.