2 things you can try (without knowing further details about the problem - e.g. when did this start, has it always been this way, how old/ new is the PC, etc.).

1) Start-->Control Panel-->System and Maintenance-->Power Options-Change what the power buttons do.

2) Go into the BIOS; there is the option to change how the PC power button is to function (e.g. sleep. hibernate, turn off computer, do nothing). This is usually found inside the Power Settings of the BIOS.