When In Windows 7, go to Control Panel, Then Hardware and Sound. Then Enter Power Options, and then on the left menu there should be an option that says Choose what the power buttons do. Make sure for on Battery and for Plugged in, that where it says When I press the power button, the setting is to Shut Down.
I believe that the setting that powercroat is referring to is for the physical buttons on the computer (in other words, signals from the motherboard).
If you are hitting the windows button on the start menu, then I'd hazard a guess that there is something wrong with your PC and it isn't shutting down properly and then the motherboard is deciding to auto-reboot. Are you getting any kind of improper shutdown notifications?
Interesting. Well, even if windows doesn't tell you there was an improper shutdown doesn't mean there wasn't. For example, if you boot your PC and then immediately switch it off, it was an improper shutdown but Windows has no knowledge.
you could try unplugging things you don't need (including the power button in the case) and turn the PC on by jumping the pins with a small screwdriver. Then try turning it off and see what happens. If it doesn't reboot any more than you know something you unplugged is the problem.