Depends a bit on the phone. I've seen suggestions that some (newer) phones cannot easily be unlocked.
It's not uncommon to see some small phone stalls at indoor/outdoor markets where they will charge a tenner, sometimes less on Ebay but much less of a guarantee - at least with a till receipt you have proof of payment (and if you take the other SIM with you...)
Some just use a sequence of * # and some numbers, but others need to have a cable plugged in and some specialist 'hacking' software used.
I've tended to buy either a new (cheap) phone on the network (from Argos / Asda) or an unlocked one on Ebay.
It's perhaps also worth pointing out that phones for Asda (which uses Vodafone) are all unlocked and not super-expensive, for the range they have. Most 'new' phones (ie released late 2008 or in 2009) will have very high cost for unlocked models though.
Not important this minute, perhaps, but SIMs for the Three network may not work with other network phones, simply because the Three network uses different frequencies, AFAIK.
The original Voda and Cellnet phones used 900 MHz frequency band, above the UHF TV sigs). Orange and T-Mobile use 1800 MHz, and many of the phones for those networks were therefore 'dual band' 900/1800 so in an emergency, could make a 999 call via a Voda/Cellnet cell on 900 MHz
Now if you look at phone specifications you will see dual band, tri-band, quad-band (as N America uses 1900 MHz not 1800). Never looked too closely at the quad-band phones. Anyway, Three uses 2100 MHz, so there's a chance their SIM won't work with phones not made for Three.
(Comments about other phones, networks, included in case someone else finds your thread.)