hard disk problem system restarts itselfs

sometimes if the hard drive fails in a way that it locks up the control chips on the mb. the first test to see if a drive is working is to place hand on the drive and see that it spinning at one speed at post. if it spinning up or down or making noise the drive at the end of it life.
Try running chkdsk. Open a command prompt as an administrator and type in:

chkdsk c: /f

assuming C is the drive you want to check. If it says the drive is in use and to schedule a chkdsk at the next boot, answer yes. Now reboot if needed and let chkdsk do it's thing. You should be able to see the results in the event viewer after the computer boots back into windows.