Your power button is crushed and when you on main power line, it is connected automatically. So it is turn on automatically.
you should try to disconnect from power; remove all USB and then link PC returning to energy and you will see...i got the same issue and cause was that the mouse was connected to 3rd USB slot and that begins my PC instantly ....
a long shot here...you dont have an old dial modem? mine used to switch the PC on if someone phoned me...
If it turn on when you plug it's power cable then it can be controlled from bios setup. When you power on your system go to bios setup power management and set it according "stay power of". I answer what i guess and understand your question.
Two Reason available your computer turning On when you on the main power First is that your Computer Button not work properly second reason is that please go to the bios and read the carefully you find the one option in these system wake up system option then you disable if you not find then you choose the default system setting. if you confirm the system model then I guide you step by step.
if a pc boots up when power is switched on, this can happen when the pc is set to reboot on a power cut In the BIOS (all latest MOBOs have this, I think..) there is Advanced Power Management (APM) there is option like this: Restore from AC power loss [always off | always on | last state] both my linux machines do it for me as i run them as servers and is in fact normal on some boards also some boards are set to WAKE UP BY LAN in bios
You Windows people with your viruses. Does it still do that if you remove all usb devices. It can be hardware problem, try to disconnect power button form motherboard. Try to switch PSU.
Its you have to set in BIOS. Under Power Tab: After Power Failure - Last power state should be turned .i.e, Power OFF is to be set. So that after you power ON mains system will be OFF until press Power ON button of System.