My computer keeps turning on and off, on and off, on and off...?

On Tuesday I was making songs on the FL Studio demo, and since you can't save the songs in demo version I put the computer in Sleep mode. I turned it back on soon after and worked all night till 4 o'clock in the morning, then turned the computer off and went to sleep. Next morning I tried to turn it on... show more On Tuesday I was making songs on the FL Studio demo, and since you can't save the songs in demo version I put the computer in Sleep mode. I turned it back on soon after and worked all night till 4 o'clock in the morning, then turned the computer off and went to sleep. Next morning I tried to turn it on again. The power indicator lit up, the fan started, that cylinder symbol lit up, basically the computer looked like it was turning on, but after a second everything shut down again. After another second everything turned on, and then a second later everything turned off. This kept repeating on its own. I tried holding down the power button and nothing happened. So I pulled the plug. I put it back in and tried again, same thing. I unplugged the computer, tried again. After repeating this a couple times I held down the power button and the computer turned on just like normal. Well I kept it on overnight and turned it off Thursday night. This morning I tried turning it on again and the same thing happened! This is the family computer, which my dad bought. I know nothing about hardware, but we have a box on the top of the tower that I think is an external hard drive. This morning when the computer would turn on, the box would start whirring. Then the computer would turn off and the box would keep whirring. Then the computer would turn on again, the box would continue whirring, but then the computer turned off and the box stopped whirring. Then it would start again, and keep going for two of these "cycles." Also I figured out that if I unplugged the computer as soon as it turned off, and then plugged it back in immediately, the computer would still keep turning on and off as if nothing happened. I tried for half an hour this morning to turn it on like Wednesday morning but it wouldn't start this time :/ What the heck is going on?!
We have an HP Pavilion running Windows 7. There are stickers on it that say we have an nvidia graphics card and an Intel Core i7 inside. That's really all I know :/ We didn't build the computer on our own.
3 answers 3