Try some of these basic things first.
- Check all your connections, make sure nothing's loose. Push in and tighten all the jacks, plugs, connectors, etc. that you can.
- Blow away any dust around your main components (Mobo, CPU, PSU, GPU, etc)
- Check your temperatures, make sure nothing's getting too hot and overheating
- Make sure all the power plugs from your PSU are going to all your components correctly and securely
- If the computer runs for long enough, try doing some basic maintanence on your OS. Defrags, spyware/malware scans, virus scans, etc.
If none of that works, then I'd say it's time to look at real hardware problems.