Does the computer shut down properly from safe mode?
To boot into safe mode:
Boot up the computer.
After the POST (the *beep*) start tapping on the F8 key over and over again.
You should get a boot menu.
Choose #3 safe mode.
Now...try a shut down. Did it work?
If yes... boot up and try a clean boot.
To clean boot the computer:
Go to start>>run>>msconfig
Choose selective startup.
Take the check out of everything underneath.
Click apply>>ok and reboot when prompted.
When you finally get back up... i'm guessing you will have to still physically turn off the computer for the changes to take effect... try a shutdown again. Did it work?
If it did... go back to msconfig and start troubleshooting by rechecking things one at a time. You will find your culprit in there somewhere.
Most likely it is a driver or a piece of software that is causing your problem. I realize the advice i just gave you is very similar to the advice in the troubleshooter jimi_1 mentioned... but it's good advice.
Are you running any antivirus software or a firewall? These programs have been know to cause shutdown issues in all versions of Windows. Was this an upgrade or a clean install? Upgrades can cause all kinds of problems, especially if you have any older drivers on your system. Have you updated all of your drivers? Especially video and sound card drivers? ME can be very particular when it comes to drivers.
And... last but not least... if you have a *very* fast machine, MS has put out a shutdown suppliment on their Update site. If your box is newer, and uses ATA/100 drives, you may be encountering a problem there. If you do not have a newer, fast machine, *do not* download this update... wrecks havoc. trust me.
Good luck!