Do you know you have a virus? Computers shutting down can be common and the reasons are typically....

1. Bad/Insistent power input (solved with a battery backup between the wall and the computer)
2. Bad computer power supply.. (Solved with a new power supply)
3. Short in the Motherboard..(bad news.. need a new motherboard)

**This issue actually belongs in the Hardware section I think***