It depends on if you get an unlocked version of the iphone; I believe that you can purchase an unlocked version in the UK for a premium.
The US version is locked to AT&T.
Some of the features will not work (Visual Voicemail) without carrier support.
Most features of the phone should work if you can get an unlocked one.