my compaq presario CQ50 will not stay on even if its pluggedinto the outlet what must i do to fix it?

Solution
If it does this with the battery removed and on a known good charger, you can try cleaning it out, re-do the heatsink with new thermal paste. If that does not work, it may just be a failing motherboard or RAM, it's a pretty old laptop.