There are several reasons that you may have this problem. KB article 320008 indicates that using fast user switching may be the culprit; XP is running under heavy stress. For either of these cases, service pack 1 should resolve the problem. Have you installed service pack 1? You can download it from www.microsoft.com. More information is available from this link as well: http://support.microsoft.com/default.aspx?scid=kb;EN-US;320008.
KB article 315664 details problems with USB devices which may cause this problem and a possible solution. Are you using a USB keyboard or other devices?
It can also happen if the computer supports advanced power management options but is not configured to use them. If this is the problem you can:
Click start, then click Settings
Click Control Panel
Click Power Options or performance management then power options
Click APM tab
Click to select Enable Advanced Power Management Support
(See KB article 313290)
Also check the Advanced page on the power options module. Look for the statement "when I press the power button on my computer" -- this drop down box might be set to "do nothing" which would give the symptoms you mention happening when you press the power off switch.
Another reason may be the computer bios settings. You will want to refer to documentation, or get some direct help in investigating if this is the case. Did the computer come with XP home installed? You should contact the company that installed the operating system for assistance.
You mention that using the power on/off doesn't work either. This is a hardware issue. It might be resolved by something as simple as holding the on/off switch down for a few seconds until the system powers off. Check your hardware documentation.
This was first published in January 2004