What is the difference between DFU mode and Recovery Mode :

Recovery Mode : Recovery Mode is a state of iBoot that is used during standard upgrades and restores. As iBoot is active, it does not allow you to downgrade your device’s software. Also, unless it is ‘pwned,’ it will not allow custom firmware to be flashed.
Click here to enlarge

DFU Mode : DFU Mode is a special mode where the device can still interface with iTunes, yet it does not load the iBoot. The screen will appear totally black in DFU mode, so you can’t guess whether the device is in DFU or powered down from simply looking at the screen. Because iBoot and the OS are not loaded this exploit makes us able to downgrade your iPhone firmware or upgrade with a custom firmware created by Pwnage tool.
Click here to enlarge

How to put iPhone 4, 3GS in DFU mode :

Required Downloads:

Steps to enter DFU mode :

Step 1 : Connect your iPhone with your PC then open iTunes

Step 2 : Press and hold the Home button and the Sleep button at the same time.

Click here to enlarge

Step 3 : After 10 seconds release Sleep button but keep holding the Home button until iTunes pops up this message "iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes". And your iPhone will remain in black screen.

Now you have successfully put iPhone in DFU mode.