Simply put, press both Home and Power button together until you saw some "turn off" message then release Power button but still hold Home button until you saw a picture with Cable plugging in. When linked with iTune, it will get into DFU mode where you can select whatever version of iOS you want to restore to.
DFU mode was used for Jailbreak before. Of course you may not always be able to select any version of iOS since Apple force your baseband version to be bundled.
Anyway, try DFU mode which will erase all your data, but guarantee you fresh empty iPhone.