From ModMyiFone - Wiki
DFU MODE
This method is best for restoring, upgrading, downgrading and such. This is not the same as regular restore (with the "Connect to iTunes" logo)
Step-by-Step:
1. Turn the iPhone ON
2. CONNECT it to the dock
3. Make sure iTunes is open so you'll know when it enters DFU mode
4. HOLD the Power/Sleep-Wake button AND the Home button for 10 seconds
5. RELEASE only the Power/Sleep-Wake button and continue to hold the Home button
6. WAIT until iTunes recognizes the phone in DFU Restore mode (in Windows a bubble pops up saying it recognized new hardware "DFU Mode" or something to that effect)
The last step may take SOME TIME, like, say, even 60 seconds or so. The screen should be OFF (black), if you see the "Connect to iTunes" logo, START OVER. It may take a few tries to do the steps just right, just reboot (hold both Power/Sleep-Wake AND Home until the Apple logo appears and the phone turns back on) then try again.