I am not sure on what is wrong but I can give you a couple of things to check out.
Make sure that the computer is well vented and that the cooling fan is working ok. If the graphics card has one make sure it is running also.
Check to see that the graphics card is seated correctly. When it starts to get warm the connectors could dislodge themselves and cause the problem.
If these are ok, you need to scan for any virus's and spyware.
Hope this helps.