“Won’t turn on” can mean two different things: the computer shows no sign of power, or it powers up but never reaches a usable screen. Note which one is happening before changing hardware.
Quick checks
For a desktop, check that the wall socket works with another device, the power cable is firmly seated and the power supply's rear switch, if present, is on. For a laptop, connect its intended charger directly to a known working socket and allow time for a flat battery to respond. Disconnect docks and optional USB devices during this check.
Look and listen. Do fans spin, lights appear or startup sounds play? If yes, the computer has at least some power. Check the monitor's power and input selection before assuming the computer itself failed.
If there is no sign of power
Try a different compatible power cable or charger only if one is available and correctly specified. Avoid opening a power supply or charger: capacitors can retain dangerous charge after unplugging. If the socket and external cable are sound but the desktop remains completely dead, the power supply, front-panel switch or motherboard may need professional diagnosis.
For a laptop, inspect the charging port and cable for damage. Stop using a damaged charger, a swollen battery or a device that smells hot or burnt.
If lights or fans start
Check the display cable and monitor input. On a desktop with a separate graphics card, confirm the cable is connected to the intended display output. If the system shows a manufacturer logo and then fails, the issue is in a later startup stage; record any error message rather than repeatedly cutting power.
If you recently changed memory, shut down and unplug the machine, then check the module seating using the RAM installation guide. Otherwise, avoid removing several parts at once. One change at a time makes the cause easier to identify.
When to stop
Stop immediately if you see sparks, smoke, liquid damage, a swollen battery or hear unusual electrical crackling. Disconnect power if it is safe to do so and seek qualified repair help. If important files are on the computer, tell the repairer before any reinstall or drive replacement. Repeated forced restarts can make a failing storage problem worse.