Apple boss Steve Jobs says there are 100 new features in all. Multitasking will allow iPhone and iPod Touch users to run more than one application at a time, and a new advertising platform called iAd allows adverts to be placed in applications made by third parties.
External developers will be allowed to keep 60 per cent of the ad revenue generated from iAd.
Apple's move into mobile advertising was widely expected after it bought the Quattro Wireless mobile advertising network for around $300m (£196m) in January.
Some of the other features added to OS 4.0 include the ability to create specific folders to store third-party apps downloaded from iTunes, enhanced mail which will gather email from multiple accounts into one unified inbox, and iBooks, which is already available on the iPad.
The iPhone OS 4.0 update will be released for the iPhone and iPod Touch first, and then the iPad, later this year.
Jobs also revealed that the company had sold 450,000 iPads as of April 8.