I am sorry to hear that you are having issues with your computer - we will do our best to help you remedy the cause quickly.
Common causes of this are overheating due to a broken/disconnected CPU fan, dust etc, a bad PSU, bad Ram or an incorrectly seated memory or video card, please refer to my canned cleaning guide text below;
Do you have or can you borrow a known good PSU of the same or above quality and output?
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 that all internal connections are secure and that there are no loose components,
write down the PSU (power supply unit) details (make and model)
re-assemble the computer, boot up and see how it goes.
Just a cautionary note, if you do use canned compressed air do not upend the can as it is possible for fluid to be emitted.
Post back when you have done the above and let us know the results, if no joy we should next look at the Ram and video card.
Some guidance regarding PSUs (power supply units)
As a PSU puts out various voltages +3.3V, +5V and +12V it may appear that the PSU is working correctly but it is not, any significant drop of any output can prevent the system from booting up, the other scenario is a significant increase in the output which can be worse as it can fry one or more major components such as the MB, CPU, Ram, add on video card etc.
Please be aware that there are no user replaceable parts in a PSU so a bad one should be disposed of in a responsible manner and any type of conclusive testing will need to be done by a suitably trained Tech who has the required testing equipment and the relevant knowledge as to how to use it.