It could also be as simple as a bad contact between components inside your computer case. Make sure your video card, sound card, and such things are steadily in their slots, and memories, and everything. With bad luck there could be also physical damage somewhere. That happened years ago with my laptop: The CPU socket had a fracture and the computer froze randomnly.

But of course it could be also something totally else, like Ryllharu suggested.