How to prevent a Samsung Galaxy S4 from auto-restarting? My Samsung Galaxy S4 auto restarts.

I removed Battery , SIM card , SD Card for over 1-2 hour, and replaced but the device still auto restart.
I tried &quot; Home&quot;+ &quot;Volume Down&quot; + &quot;Power&quot; and saw the message &quot;Warning! Critical Problem&quot;. I had to choose &quot;Continue Or Cancel&quot;. However, choosing Continue or Cancel has no effect.

Any idea why this auto restart is happening? Can any software format the device using computer? I can't open my phone now, because when I plug the battery the device auto restart.
Try to get into the recovery. You can access it by pressing Volume UP + Power Button. When your screen turns on, release the Power Button. 
If you can get into the recovery without constant restarting problems, you can make a "factory reset". This will delete all your data and settings but might solve.

But as a side note: Try to provide more information. When did it start turning itself on/off? What apps did you install before? What is your android version and is your device rooted or not?