Recently my computer often shut down automatically after turning it on for about 10 min. Then I can not turn it on. I have to wait 1 hour to 24 hour to turn it on. At the same time I have to turn the switch on the power supply at I or O position back and forth and then I could turn my pc on. and then it automatically shut down again after about 10 min. I check the CPU cooling fan, it is running. Power supply fan is working too. MY CPU is AMDk6-II 300 mhz.
It sounds like it could just be a faulty power supply. My girlfriend kept having that problem with her computer too. The power supply fan was running so I couldn't figure it out. One day the power supply fan did stop working so we got a new one. That was about 3 months ago. Now it can stay on all day and all night with no problems.
In my job as a network tech I see this problem fairly often, and Youngone is pretty much right, as it is most likely a faulty power supply, however, it could also simply be an accumulation of statically charged dust and grime. Get some compressed air, either by can or just a plain air compressor, and give your power supply and computer a thourough cleaning. That may solve your problem. If it persists you will most likely need a power supply, but it can be something else too, make sure the connectors from the powersupply to your mainboard are securly in place. Often when swaping parts in and out you can accidentally loosen those motherboard connections and they simply need to be reseated.