As stated by talha hasan, if you get a restart message before the system reboot it is more likely that the Remote procedure Call RPC failed. There is a temporary fix for this problem. Go to
Start >
Control Panel >
Administrative Tools >
Services
In the Services window locate the service that reads "
Remote Procedure Call (RPC)". Double click to open the RPC window and click the "
Recovery" tab. Change the "First Failure", "Second Failure" and "Subsequent Failure" to :
Take no action. Apply the settings. This will prevent your computer from restarting but your computer my still be infected with virus.. Download and Install
Avira Antivir Personal Classic Edition (The best free antivirus software that i know of) and run a full system scan to clean your system from virus.
[Edit] : Sorry I didn't read your last message..
If your system reboots at random intervals without showing an error message then it has something to do with your hardware. In most cases low memory (RAM) or improper hardware configuration. Make sure you don't have any software installed that is eating up most of your system memory. Post your system specs here