Ultrasn0w 1.2.7 unlock supports iPhone 4 models running the older 01.59.00 baseband, and iPhone 3G and 3GS models running baseband versions 04.26.08, 05.11.07, 05.12.01, 05.13.04, or 06.15.00.
Unlocking is a process that frees your iPhone to be used on GSM-based cell carrier networks other than AT&T. The process requires jailbreaking, or hacking your iPhone to allow installation of third-party apps that aren’t available through Apple’s iTunes-based App Store.
Apple also sells unlocked iPhones, but at full price instead of the subsidized prices carriers offer for locked phones. Apple’s unlocked phones are supported by the company, but jailbroken iPhones that use tools like Untrasn0w aren’t.
Ultrasn0w 1.2.7 and redsn0w 0.9.12b1, the tool for jailbreaking your iPhone, are available for free and the Dev-Team blog.