From box unlocking

my friend is getting an iphone in the next couple of days, and wants to know how to unlock it without activating it and buying a contract, now i would like if possible a full step by step guide on how to do this as he asked me to do it and i dont want to sod it up for him.

first question is that i have a mac and he has a pc, will this effect anything at all when i come to giving his iphone back to him?

Also i'm in the UK so this'll be the new firmware with the whole O2 thingie so i'm wondering if that'll effect anything

MacRumors attracts a broad audience
of both consumers and professionals interested in
the latest technologies and products. We also boast an active community focused on
purchasing decisions and technical aspects of the iPhone, iPod, iPad, and Mac platforms.