This is all the steps for a fresh, virgin OTB iPhone which is purchased in the UK.
This SHOULD work with all Euro iPhones. So if you are in France, this will work with Orange(I believe). If you are in America, this will work with AT&T.
Basically, this allows you to use any sim from the carrier that it is locked to.
Also, this includes EDGE settings and voicemail hack for O2 (Visual voicemail is impossible). However, if you are clever, you could probably rejig it so it works for your carrier .
I can't be bothered to type it up and reformat the article, so I'll just post the link here. Sorry about that.
Here you go
EDIT: http://hackint0sh.org/forum/showthread.php?t=15849 There's another one. It's really not that hard to search .
This solution is if you're so impatient that you can't wait till friday for iDemocracy 2 to come out.