Well, it's no surprise. Every time Apple releases a major OS upgrade, there's a security element included. In this case, the new version of the iOS (formerly iPhone OS), contains more than 60 security fixes. These fixes, as expected, run the gamut of the OS: from Safari cookies to application sandboxes; from WebKit (the framework for displaying web pages), to, well, WebKit (50 of the bugs fixed are in WebKit alone). (You can find details about the security update here.)
You'll need to have a compatible device to install iOS 4 (iPhone 3 or 3G, iPod touch 2nd or 3rd generation), and installation is done through iTunes. Connect your device, then click the Check for Update button on the main screen for the device. It's a big download; more than 300 MB.
But what about other devices that run what is now called iOS? Do they have these security flaws? Are we going to see updates for them? For the iPad hasn't received these fixes; the iOS 4 update for the iPad won't be ready until the fall. Or what about older iPhones or iPod touches? Are they vulnerable?