Download QuickPwn from here to your desktop.
Double click the downloaded zip file(QuickPwn.zip) to extract a folder called quickpwn.
Download the 2.0.1 firmware for your specific iPhone and place it in the quickpwn folder you just created.
iPhone 2G: iPhone1,1_2.0.1_5B108_Restore.ipsw
Connect your iPhone to the computer via USB cable, make sure iTunes detects it, and then close any iTunes processes that start. Then in the quickpwn folder double click either iPhone 2G.bat , iPod touch.bat , or iPhone 3g.bat depending on which device you are using.
If prompted click the Run button to launch the batch file.
You will then be asked to power off your iPhone and press Enter once it has been turned off.
QuickPwn will now help you put your iPhone in DFU Mode. Read through the instructions so you know whats ahead then type in y and press Enter. As an alternative you can put the iPhone into DFU mode yourself using these directions then press Enter: Open iTunes and connect the iPhone to your Mac or PC. Press and hold the Home button and the Sleep/Wake button at the same time. After exactly 10 seconds release the Sleep/Wake button. Continue holding the home button until you iTunes pops up a message telling you that it has detected an iPhone in recovery mode.The iPhone screen will remain black like this:
First you will be asked to hold down the Power button for 5 seconds. Then you will have to also hold down the Home button for 10 seconds without letting go of the Power button. At the end of 10 seconds you will need to release only the Power button.
After a few seconds of holding down just the Home button QuickPwn will detect the DFU mode and start performing operations.
After 8 operations are performed QuickPwn will ask you to "Please wait while your iPhone is Jailbroken". You can press any key to close the command prompt window.
Your iPhone will display a turning wheel and in a few minutes will be jailbroken! If you have a 2G iPhone and would like to unlock simply install and run BootNeuter from Cydia.