http://www.theunlocker.co.uk/mobile_phone_unlocking.php
It's not illegal to do this, but it does void the phone warrenty unless you get it unlocked by your service provider.
Personally I don't see anything wrong with wanting a phone unlocked. I mean if you upgrade your handset to another PAYT or Contract then you should be allowed to swap out sim cards from other networks without problems imo.
I know that it stops theives selling them on, but honestly if a phone is possible to be unlocked they'll always find a way to do it anyway. So realistically all this does is handicap legitimate users who want to swap sims.
There have been a number of occassions when my mates batteries have died and they've needed to call someone but not have their charger with them, so we'll swap sim cards. Most of them are on the same network as me so it isn't an issue but 2 of them are on O2, which means we can't swap sims to make calls off of a phone with battery left. Well anyways that site should help you in your unlock quest.