Just like "treefrog07" said in his reply, you have to manually shut down your PC. There is a switch at the back of your hard drive which you turn off. When you turn it on again, you'll be re-booting the PC. If the problem occurs again, run a scan-disk error check.
You can pull the plug from the wall or hold your power button down for more than four seconds, but this is not the proper way to shut down your computer. Each time you do an improper shutdown you cause more damage to your system. There is a couple of reasons why XP won't shut down.
First of all you want to update your virus definitions of run a full scan. The same with your spyware cleaner. A virus or spyware running in the background can interrupt your system when you go to shut down. These stubborn programs do not want to be shut off and continue trying to run. In most cases, however the biggest reason XP will not shut down is because of a corrupt registry.
When Windows tries to shut down. It references the registry to see if any settings have been changed. If it comes across corrupt entries or registry keys that are trying to reference software that is no longer on your PC, by default it will wait the full 30 seconds per program. So what you need to do is clean and repair your registry. By installing and un installing software you create registry keys. Uninstall programs never do a complete job and leave behind entries. You need to clean these out of your system.
Over time, your registry will become bloated and slow. This causes slow start ups, slow shutdowns, blue screens, slow program load times, and other annoying problems. The best way to clean and repair your registry is with a third-party program designed to do this. You can do it manually, but is not recommended. Delete or change the wrong file and your computer may become unusable or unstable.
It is much easier using software that is safe and effective and will not remove any entries that you need to run Windows. The whole process can be done in less than a minute. Running a scan on a fairly new computer resulted in over 300 errors. The PC, we ran a scan on was less than a month old. So you can imagine an older computer will have a lot more errors and bad entries.
Once you clean and repair your system it should run like it did when you first bought it. Some systems have become so corrupt that it would take over 30 minutes for the computer to shut down. Computer technicians like this problem because it is easy to fix. For service calls, they will carry repair software on a CD or memory stick, run a quick scan on the PC and repair it. Now you can purchase same software they use and save yourself the service call fee. Or a trip to the shop.