Hard to say, because its a laptop. Check if its not overheated or if all fans spin as they should.
Being realistic: Laptops have a tendency to fail often. Try contacting compaq to discuss price of an eventual troubleshooting.
Dear friend, how to check for the overheating and correct fan speed.