What antivirus are you using? Can you tell me a little more of what programs you run, do you use the internet, stuff like that.
Recommend you download a good free antivirus like Avira Antivir, and a malware/ trojan checker like Spybot Search and Destroy. Also defragment your hard drive/s regularly.
it depends what's happening while it's shutting down
if the hard disc light is flashing all the time it could be down to low disc space
remove progs you don't use
backup music and photos etc
you need about 20% free
install and run http://www.ccleaner.com/download
then run chkdsk ... and finally defrag
unfortunately it could also be about 100000000 other things
drivers, missing windows sound files ....