The iPhone Dev Team has released Ultrasn0w which will let you use your iPhone 3G with any mobile phone carrier, in order to use it you will need to jailbreak you iPhone 3G with redsn0w or the Pwnage tool, and then follow the instructions below.

Ultrasn0w iPhone 3.0 Carrier Unlock

Ultrasn0w for iPhone 3G is ready!

1. Ensure you have upgraded to iPhone OS 3.0
2. Jailbreak your iPhone 3G using redsn0w or PwnageTool (this will also install Cydia/Icy)
3. Run Cydia or Icy
4. Please add the repo repo666.ultrasn0w.com to Cydia or icy
5. Search for ‘ultrasn0w’ in cydia or icy and install ultrasn0w
6. Reboot your iPhone 3G
7. T-Mobile USA users should disable 3G before using ultrasn0w
8. Enjoy

Head on over to the iPhone Dev Teams website for more details

Update 3rd July 2009

The iPhone 3GS Jailbreak has been released, full details below.

purplera1n iPhone 3GS Jailbreak

Update 6th July 2009

There is now a Mac version of purplera1n available.

Purplera1n iPhone 3GS Jailbreak – Mac

Update 8th July 2009

The iPhone Dev Team have now released the latest version of redsn0w which works with the iPhone 3GS.

Redsn0w iPhone 3GS Jailbreak

Update 14th July 2009

There is now another iPhone 3GS unlock available which was developed by George Hotz

Purplesn0w iPhone 3GS Unlock

Update 16th July 2009

The iPhone Dev Team has released a new version of Ultrasn0w, you will need to jailbreak your iPhone or iPhone 3GS with Redsn0w first.

Ultrasn0w 0.9 iPhone 3GS Unlock Released

Update 10th September 2009

Apple has released a new version of the iPhone OS, version 3.1

iPhone OS 3.1 Full Details

Update 3rd October 2009

iPhone Pwnage Tool 3.1.3 For iPhone 3GS

Update 12th October 2009

George Hotz has released his Blackra1n Jailbreak for iPhone OS 3.1.2

Blackra1n iPhone Jailbreak

Update 13th October 2009

The iPhone Dev Team have released PwnageTool 3.1.4 for Mac OS X

Dev Team PwnageTool 3.1.4 for Mac OS X