iOS 4 formerly known as iPhone OS 4.0 is now available for installation on 2009 iPhone 3GS and iPod Touch 3rd Generation models with 32 and 64GB of storage.
You may also install the firmware on earlier models from 2008, namely iPhone 3G and the 2nd generation iPod touch, as well as low end releases from 2009 (e.g. 8GB iPod Touch?) but you will not be able to enjoy multitasking as these units lack the required RAM and processing power to run the feature.
If you own any of the iOS4-supported Apple products, you might want to follow this step by step guide on how to install the updated firmware on your mobile device.
1. Download the latest version of iTunes and install the software on your Mac or PC.
Download iTunes 9.2 HERE.
2. Connect your iPhone or iPod Touch to your Mac or PC via USB. iTunes should automatically launch as soon as you plug in your device. But in case it doesn't, manually launch the software.
3. Select your device in the iTunes sidebar. Doing this will show the device's content summary.
4. Back up your settings before upgrading the firmware. To do this, simply right click on the device's icon located at the sidebar (iPhone or iPod Touch icon) and click Back Up. This should take around a minute or so. If iOS4 installation goes awry, you can just use the similar menu and choose Restore from Back Up...
5. On the device summary page, click on Check for Updates. If your device supports iOS4, system will tell you that the update is available for download and guide you through the whole installation process. Do not disconnect phone until the update has finished.
There you go. I hope you find this helpful.