Simply fill out this small form on the O2 website and they will unlock your iPhone.
Although if you bought it as a PAYG iPhone I believe you will need to wait 12 months from the date of purchase before O2 will unlock it. As far as I'm aware, this is most likely the situation you will be in?
Yes, but if you read the other thread, you'll see O2 don't seem to be looking to deeply into the details behind the contracts, if you provide an iPhone IMEI and a O2 contract phone number they seem to be unlocking the handsets regardless. It's worth a try, the worst they can do is say no!
The alternative is Jailbreaking the handset, I know nothing about this and you'd probably be better checking the forum specific for that purpose