The iPhone Dev Team has released an updated version of the ultrasn0w tool that adds support for iOS 5. You can use ultrasn0w to carrier unlock an iPhone. In other words, this is the tool you need if you want to use an AT&T iPhone with T-Mobile or another network.
In order to use ultrasn0w, you have to jailbreak your device. There’s a way to perform a tethered jailbreak on most devices running iOS 5, but you’ll need to connect your iPhone or iPad to a computer and run the jailbreak tool again every time you reboot. The only device that supports an untethered jailbreak right now is the iPhone 3GS with an older bootrom.
While ultrasn0w 1.2.4 now supports iOS 5, it does not work with newer basebands. In other words, if you’re already using ultrasn0w to unlock your device and you want to upgrade to iOS 5, you’ll need to use redsn0w to create a custom IPSW that preserves your older baseband.
You can currently do that with redsn0w for OS X. The Windows version will get that feature soon.
The latest version of ultrasn0w is available for download from the Cydia Store for jailbroken devices. While the new app adds support for iOS 5, it’s also backward compatible, so you can use it to unlock a device running iOS 4 as well — as long as you have a supported baseband.