Right folks to be clear, those who post and do not provide their handset model or contract provider will more than likely not get a response or even worse, get duff information.
localboy - 'Will this work if I use my sisters' contract number?' A = probably ortherwise it will cost you £15 of credit from your O2 PAYG SIM.
Paulg - It would probably have to be an iPhone contract to get a free unlock. O2 will unlock for £15 using credit from an O2 PAYG SIM. Google O2 unlockmyiphone for a link to the O2 unlock request form and yes, they need the IMEI and it is done through iTunes. Instructions are on the O2 site or on the forum if you search
This should apply to all iPhone handsets now that O2 has begun officially unlocking the iPhone 4 since 6th December.