While I used to create unlocking tutorials for years, I have stopped doing so because I'm
unable to. The main reason is and there hasn't been a free software unlock from the
iPhone Dev Team in two years! That's right, June of 2010 was the last time ultrasn0w
was capable of unlocking a new modem firmware. The only people who can unlock their
iPhones using ultrasn0w have been carefully protecting their modem firmware from being
updated for the last two years now! One mistaken upgrade and that phone is locked! This
lack of a new unlock rules out all new iPhone purchases for the last two years. Sorry,
but I'm really trying to drive this point home.
Don't get me wrong, I'm grateful for everything the team has done to provide us with free unlocks for the first few years of the iPhone's existence. However, I want to continue to purchase newer iPhones and not have to worry about the lack of an unlock or complicated upgrade paths to maintain an older modem firmware . I also don't want to have to rely on hope alone that the team will finally unlock a new modem firmware. There was only one unlock released for the iPhone 4 not longer after it went on sale. No unlock has been released for the iPhone 4S, and the next iPhone will be out in a couple months. Do you still want to wait on a free unlock? Me neither. With jailbreaks taking even longer to be released when new firmware arrives, unlocking continues to become a lower priority in the jailbreak community.
However, now we no longer have to worry about this since Apple has been selling factory unlocked iPhones for a year now (both the iPhone 4 and the iPhone 4S.)
If purchasing a factory unlocked iPhone isn't an option for you, then your only other choices are listed below.
The iPhone Dev Team developed a software unlock called ultrasn0w. It's available on Cydia and only unlocks the following modem firmwares (also known as basebands):
Redsn0w is able to create one of these custom firmware files to do this. I have an old tutorial demonstrating this here. TinyUmbrella does this also, see this much older tutorial here. There won't be any updates to these tutorials for the forseeable future, because I only purchase factory unlocked iPhones.
Another option is to get your carrier to unlock your iPhone. AT&T has started doing this for iPhones that have fulfilled their contract, or have had their ETF paid. You have to be a current or former customer to receive an unlock. You can't just purchase an old iPhone from someone and then call up AT&T to unlock it. This method costs nothing and is permanent. When a new firmware comes out you can install it without any worries about maintaining an unlock.
My wife just got her iPhone unlocked by AT&T. It took only minutes! You can read about it here.
On a related note there are some websites out there that are able to provide carrier sanctioned unlocks (they probably know someone who works at the carrier that has access to the whitelist) for a fee. You can read about one of these such sites over at the MacRumors forum.
Your final option (and this is not an endorsement) is to use a product called the Gevey SIM. It's known as a SIM interposer as it goes between your SIM card and the SIM reader in the iPhone. It takes advantages of certain technological vulnerabilites in the way the SIM is queried to fake the iPhone into thinking you have a legitimate SIM card installed. The downside? Having to worry about creating custom firmware files that do not update your modem firmware every time Apple releases a new firmware.
One of the most reliable sources for purchasing these SIMs is apparently from a company called ApplenBerry.com.