If you don’t want Apple collecting data on you and using it to target you with ads starting July 1st, you can opt out from “any device running iOS 4,” says AppleInsider. The opt-out is automatic when you hit up http://oo.apple.com from an iOS 4 device, and as far as I can tell you can’t undo it, so don’t click the link unless you really want to opt out. Also, it’s not working at the moment.
On the support page, Apple notes,
If you receive an “Opt out not successful” message, please wait a few hours and try again.
Note also that Apple doesn’t say it won’t show you ads, only that they will no longer be chosen based on your purchasing and download history.
“Apple’s iAds allows users to opt out of data collection” [AppleInsider]