Stuck at loading spinner after resetting iPhone 4 (iOS 7.1.2)
It sounds like something's gone wrong with the reset process, but you should be able to recover the phone without too much trouble.

First, open iTunes and connect the phone to your computer. If the phone appears in iTunes without displaying any error messages then you should be able to restore it from the iTunes interface.

If the above doesn't work you can force the device to turn off by holding down the Power and Home buttons until the screen cuts out. At this point you should be able to turn it back on and (at the very least) restore the device via iTunes.

If that doesn't work, try putting the device into DFU mode:


Turn off the device (if it isn't off already) by holding down the Power and Home buttons until the screen goes blank.
Hold the Power button for 3 seconds
Hold Home button without letting go of the Power button, then wait 10 seconds.
Keep holding Home and let go of Power. Wait about 15 seconds just to be sure.


(Source for the above: https://discussions.apple.com/thread/5409794)

From there the device will appear non-functional but you should have no problems restoring from iTunes.