Depends on the network.
It your on orange it will work fine.
If your not on orange then depending on what software release is running it can be "jailbroken" and then unlocked.
I have an iphone 3g here which was on o2, however i have unlocked it and run it on orange.
But on the other scale, i have the iphone 3gs on o2, but its got the latest software release which is not yet able to be jailbroken and unlocked!
So i would find out what software release its running, if its 3.1.2 or higher and you want it unlocked then dont do it unless your willing to wait for an unlock to be released!