Helping people with computers... one answer at a time.
A virus scan and checking the cooling fans in a computer are good places to start if your machine shuts itself off frequently.
My computer is turning itself off after about 5 minutes. Why?
Well, there's not really enough information to go on here. I'd certainly start with a virus scan, but another possibility is that the machine overheating - I'd check the cooling fans as well.