Hi chaitya
Possible causes include a bad PSU (power supply unit) and overheating.
What is the brand and output of the PSU and when if ever was the last time the inside of the case was cleaned out of heat trapping dust, see below how to do this safely, this will also allow you to obtain the PSU details;
If the computer needs cleaning out, first remove the power cord from the wall and open up the case, take anti static precautions before touching anything inside, you can do this by touching a bare metal part of the case, remove the video card, blow out the slot and re-seat the card securely, do the same with the memory sticks, clean all internal fans, if you use canned compressed air do not let any fan spin freely this can damage them, use something like a clean lollipop stick to hold the fan.
Make sure all internal connections are secure and that there are no loose components, write down the psu details (make and model) re-assemble the computer, power up and see how it goes.