If you purchased a handset from Three after January 1st 2014, your phone will already be unlocked. If you are a pay monthly or pay as you go customer and have an older phone, you can unlock it free of charge by using one of the following methods:
Phone 333 from a Three mobile or 08433733333 from any other phone.
After you’ve requested an unlock code, you will be given it straightaway. However in some cases it can take up to 7 days. You will be sent a text with instructions on what to do next.
If you're an iPhone user and have recently bought or upgraded from Three, it will be unlocked as soon as you activate the phone over Wi-Fi or by connecting to iTunes on your computer. Otherwise your iPhone will still be locked so you will need to use the above methods to unlock your phone.
Visit Three for more information on how to unlock