Step 1. Turn off iPhone
Step 2. Connect iPhone to USB cable - it makes iPhone turn on
Step 3. Hold 'home' and 'power' at once until screen goes to black
Step 4. As soon as screen goes to black, release 'power' button while holding 'home' button
Step 5. Wait until iTune recognize iPhone - it takes 10-20 seconds to recognize
Now, iTune shows following dialog box and recognize iPhone.
Step 6. Click 'restore' button in iTune while holding 'shift' key in Windows. In OSX, you need to hold 'opt' key.
Step 7. Choose any firmware.