All electrical devices generate heat, which is why computers have fans inside or cases designed to boost air flow. Heat is an enemy because it causes things to expand or respond differently to electricity. If the printed circuits on your computer's motherboard and peripheral cards are too warm, they might make or break electrical connections. The usual symptom is the computer working perfectly for a short time after start-up, then becoming cranky and eventually comatose. But before you start thumbing the ads for a new machine, consider dust and the environment.
Dust is everywhere.
When it filters into the vents of a computer, it settles on components, building up insulation until the components don't give up heat as fast as they were designed to do. Keep your computer in a relatively dust-free area. Be diligent about dusting behind and beside the machine. Be sure to get rid of any pet fur, which is an even better insulator than dust. Never spray a cleaner onto or around the computer's keyboard, vents, fans or drives.