Computer turns on, goes to show windows xp logo and then turns off and restarts?

this happened after my dad accidently pulled out the computer's power cords. After we put them all back this problem had been reacurring.
7 answers