if its the old virus thing i think it is goto..
control pannel
administrative tools
double click services
scroll down and look for messenger
double click messenger and alter its start up type to disabled
to be honest if you have service pack 1 installed it should be already set to disabled but thats how the old shutdown virus used to get in
is it a box that says system will shut down in 30 seconds and then your pc reboots?
this site is pretty good at removing most problems
http://housecall.trendmicro.com/uk/
jsut click the free check and follow the instructions