That could be alot of things, hardware or software.
If its not software related my first hardware guess would be bad stick of memory. When memory goes bad it will usually freeze up a system like that, especially when running programs that stress memory/cpu (games, graphic programs, etc...)...