I'm not really sure what's going on but every so often my computer will shut down and reboot, it's done this for a while and has been A problem for a while now.

As stated in other reply, check for virus first.
Does the problem happen right after booting or does the computer run for a while (cold vs warm problem)?
Here are some other things to do:
1. Go to Control Panel >> "System" icon >> "Advanced" tab >> Select "Settings" button under "Startup and Recovery" and uncheck "Automatically Restart" under System failure.
2. Check input power into the system or connect system to an UPS
3. Check that the memory is properly seated.
4. Check that your CPU fan is working properly.
5. Check for a weak power supply
6. Try booting from a live CD like Knoppix and run the computer for a while. If no reboots occur then you may have a software / driver conflict.
7. Remove / disconnect all components from system except essential components required to boot machine (RAM, boot drive, video card) and check if problem is still present. If problem is fixed reconnect / reinstall components one at a time until problem returns.