Current situation of unlocking/Jailbreaking (28th August 2008)
iPhone 2G can be unlocked and Jailbroken to firmware 2.0.2 (current highest firmware from apple) see guide below:
http://sleepers.net/news/2008/08/19/...pwn-gui-guide/
iPhone 3G can be Jailbroken with the same guide BUT THERE IS NO SOFTWARE UNLOCK AVAILABLE FOR THE 3G IPHONE!
There is a hardware unlock for the iphone that involves buying another card for £30 to put in with your sim card, theis has the advantage that it "should" always work, no matter how many times apple update the firmware, read about it here:
http://www.any-network.com/