Diagnosis: This is, unfortunately, one of the most difficult of all problems to troubleshoot on the PC. The reason is twofold: first, these problems are usually intermittent, and therefore hard to pin down to any particular cause, and second, there is a really large variety of problems that can cause this sort of behavior. It is necessary to narrow done the specific circumstances in order to have a better chance at finding the problem. See below for possible causes, which are listed with the recommendations to possibly solve them.
Recommendation: Follow the questions and suggestions below to try to identify the cause of the problem:
Did you remember to scan the system for viruses? Lockups and instability are "classic" virus infection behavior.
Make sure that you disable all power management options in the BIOS setup program. They can cause spurious behavior, particularly on some motherboards.
Are you getting error messages when the problem occurs? If so, try to find the error message here.
Second, you may have a resource conflict that is causing the system to lock up when you try to have two devices access the same resources. Finally, there may be a driver problem with the device, if it is something that uses a driver in the operating system you are using. Look in this section for specific troubleshooting information for various devices. Use the resource conflict troubleshooter.
If the problem occurs only when the system is warmed up (meaning not within the first few minutes that the PC is turned on, but only afterwards), or if the problem occurs only when the room where the PC is located is hot, it is likely that the problem is hardware-related and probably something to do with the motherboard, processor or another system component that is running too hot. I would suggest that you refer to this section, which describes checking for overheating components inside the box, and follow the recommendations there.