The iPhone 4 has succumbed to the collective forces at the iPhone Dev Team who just released the first unlock for the iPhone 4. Three days after it was jailbroken, the iPhone 4 can now be unlocked.
The iPhone Dev Team posted ultrasn0w 1.0-1 on its blog today, which unlocks the iPhone 4, 3GS and 3G. You first have to jailbreak your iPhone then add repo: repo666.ultrasn0w.com to Cydia. Jailbreaking got much easier with Sunday's release of JailbreakMe.com.
Unlocking the iPhone removes any carrier locks, like the one that locks it to AT&T here in the U.S. An unlocked phone can be used on almost any GSM network worldwide, including T-Mobile, for example.