There can be many causes of system restart ..
1) Bad power supply
2) Bad Hardisk
3) Bad Ram
I suggest you to first check ram. Remove 1 stick if you have more than one then test.
If none of above worked then visit any local computer repair shop these guys are experienced and you will find whats the exact problem and cost of repair.
Best of luck