comp. keeps freezing


Solid State Member
Alright so here's my problem.

My computer used to freeze up. Whenever I was playing a game, or just using the computer to browse the net, or whatever, It would sometimes freeze just out of nowhere. Sometimes it was for about 20-30 seconds, and other times I would be stuck rebooting. Yesterday, I reformatted, and again today, the computer froze out of nowhere for about 30 seconds. Now can somebody please tell me wtf is going on with this? Is it a hardware problem? Something to do with my ram, possibly? This is getting out of hand, and I don't know what to do. Any help is appreciated.