With O2, you get unlimited data usage as part of the contract, all the free minutes per month and free texts, and you get the visual voicemail functionality (very, very good, if you get voicemail).
If you buy an unlocked one (or buy from O2 and get it unlocked yourself), it means you can put any old sim card in it and use it.
You could use it on another contract, or on a pay as you go system.
Either way, you'll only get what you get with that service.
So unless that comes with unlimited internet data too, then you won't get that.
And visual voicemail is an O2 iPhone service only (so far).
(Extra note: they're now sold out of the current iPhone. The new iPhone 3G is due in June time.)