This video tutorial from bbsiPodtouchhelp shows how to unlock an iPhone using Ultrasn0w. First the iPhone must be jailbroken so jailbreak your iPhone by following the instructions of the video from the link posted in the description. Next add the source given in the video to Cydia to get Ultrasn0w. After installing Ultrasn0w, T-Mobile users need to disable 3G. Thereafter remove the SIM card and reinsert it. Switch the phone off and reboot it. That's it - enjoy your unlocked jailbroken iPhone.