Open iTunes on computer, connect iPhone to computer with USB cable. Hold both Home and Power buttons on iPhone until iTunes recognizes iPhone in Recovery Mode. This usually takes about 20 seconds of holding both buttons. Restore the iPhone Firmware.
Or you can follow the steps in this article from the "erase your device using recovery mode" section at the bottom