The fan is currently working fine, but even though it is not shutting down as much, it is still doing it when I have a big program running like my video editing software, it did not do this before I installed Trainz.
This is definitely a heat and/or failing hardware issue and not a software issue. If your machine is rebooting, I suggest you disable the automatic reboot so you can document the failure. This will produce the infamous blue screen of death (BSOD) which will tell you what is causing the problem. With that diagnostics code, you can then post that information here on the forums and one of us techie-types can help diagnose your problem. This is found under the System and start-up options on the Control Panel.
For memory issues, which can also cause this, you can run the built-in Windows light memory test. This is found by restarting your computer and pressing the F8 key when running Windows 7 and Vista. For Windows 8, you need to go about this differently, and you'll need to look that up on Microsoft's website as I forget the key press or where the information is found on the Control Panel. If you are interested, you can also run memtest86, which is available online here:
http://memtest86.com/. You will need to download this and burn it to a CD-ROM, or use the appropriate version on to a thumb-drive so you can boot up and run the program directly. This is a more complex program and can help pinpoint a memory problem very well.
For your video card, I recommend checking the manufacturer's website. EVGA has their own video card stress program which will check for faulty video memory, GPUs, etc. ATI (AMD) and other may have the same.
If your memory tests fine, and your other individual components test fine, then it could very well be the CPU and or the motherboard, or even your power supply. Your power supply may have a failing component that cannot handle the load it is under when you are running graphics and CPU intensive applications such as video editing and Trainz. Before pressing the panic button and think the motherboard and CPU are dead, I would replace power supply first. I recommend always going above the wattage installed particularly if your system has one installed by the manufacturer such as HP or Dell who usually use underpowered or cheap power supplies. Your current power supply may not be bad, but under powered, or rated at the minimal level which gives it little room to handle a load at marginally higher levels. Given that this happened rather suddenly though, my suspicions are that this could very well be failing and it's best to replace the part.
If the power supply replacement doesn't work, then we need to look at the more expensive motherboard and CPU. The CPU could very well be overheating and shutting down to save its self from burning up. This can cause a shutdown, but not a blue screen. This is why I recommended unchecking the reboot on error checkbox. You can easily re-goop your CPU with some fresh thermal paste. Arctic Silver and other brands work very well and are easily reapplied after cleaning the CPU and heat sink. Just remember not to touch the surfaces because oily skin can contaminate the metal and cause corrosion and poor thermal transfer.
The motherboard, which would be left, is another ball of wax, and at this point you are replacing the heart of the machine. Consult here when if it comes to this point and one of the techies here can walk you through a replacement.
John