There could be a number of causes for that, ranging from a buggy program/process to a hardware fault. A few things to start with:
- How long has this been happening, and had you made any changes to hardware or software around the time the problem surfaced?
- If you boot the computer in Safe Mode, does the freeze happen after a while there too?
- Have you disabled any and all programs/processes/services that you don't need to have running?
- Do your event logs list any errors which might help pinpoint the cause? You can view your logs with the Event Viewer application in your Administrative Tools folder.
- Could it be heat-related? Make sure that your system is well-ventilated and free of dust, and that all fans are working properly.
- Check all of your cables and components; make sure everything is seated properly and tightly.