If your phone is 'blocked' (rather than 'locked') then it's likely that it's been reported as stolen (or used for unlawful purposes) and its IMEI (International Mobile Equipment Identity) added to the Central Equipment Identity Register. Only your phone provider can remove it from that register.
http://www.unlockme.co.uk/blacklist.html
If it's simply 'locked' to a specific network it's because mobile phone operators often sell phones that cost them hundreds of pounds for very small sums (or even give them away) on the understanding that they'll get their money back (and make some profit) through the owner using their network for calls and data. While it might breach the terms of the owner's contract with the phone company to get it unlocked, it's not a criminal offence to do so. Almost every street market in the country seems to have a least one stall where you can get a phone unlocked for a tenner or so.