In this video from ironman333333 we learn how to unlock an iPhone 3G. You need 2.2 firmware for this. Go into Cydia which you need for this. Go to the Manage tab. Tap into Sources, Edit, Add. Then type in atp9.yellowsn0w.com/ Then click add source. Then click Done in the top right. In sources look for the source you just typed in. Tap into that. Now Install Yellowsn0w. This will take a few minutes to download. Once downloaded, restart your iPhone. With your phone turned off, take the unlock tool and open your SIM card tray. Remove the SIM card and replace it with your new one. Once the card is in, turn on your iPhone. Your phone will now be jailbroken.