The power off function is controlled by the power supply. The O/S sends a
signal that tells the power supply how to handle the shutdown. Pressing the
power button does likewise.
If you can't turn of the PC, there is an issue with your power supply.
Now, another possibility is that you have to keep the button pressed for
about 4-5 seconds to shut down. This is a function of your bios. If you can,
indeed, shutdown this way, the P/S is fine. That being the case, I would say
your computer is crashing upon shutdown and you have it configured to
automatically restart (this is the default configuration).
Go to My Computer/Properties/Advanced/Startup and Recovery. Remove the check
from the box that says "automatically restart". Now when you shutdown, you
will be presented with a stop screen, the famous BSOD (Blue Screen of
Death). Write down the error message and post it here. Someone will be able
to assist you then.
Regards