"The iPhone Dev Team plans to release an iPhone 3G unlocking
procedure and software on New Year's Eve. They've codenamed it
yellowsn0w. To implement yellowsn0w you'll have to already have
jailbroken (baseband 2.11.07 or earlier) your iPhone 3G to run
third-party applications.
"By unlocking your iPhone you'll be able to use it wither GSM
carriers other than Apple's official operator partners, which
includes the very first iPhone partner, AT&T. As a result,
you'll be able to keep your T-Mobile service, if you're partial to
it, and still use the iPhone, for example."