These instructions will work with the latest 3.1.2 firmware, the 05.11.07 baseband, and iPhones which require hactivation. If you have already jailbroken following these instructions will be easier.
For those with a new iPhone 3GS (updated Bootrom), BlackRa1n only supports a tethered jailbreak. This means that once jailbroken you should not let your battery die. If it does die you will need to reconnect it to the computer and use BlackRa1n to boot it.
Before continuing make sure you are on the 05.11.07 baseband by following this tutorial. If you are on 5.12.01 or higher, unfortunately you CANNOT jailbreak as of yet. If your baseband is lower than 05.11.07 then you must restore to the 3.1.2 firmware for the iPhone 3G or 3GS. You can do this by opening iTunes, selecting your iPhone from the list of devices on the left, then hold down the Option key and click Restore.
You can find the Windows version of this tutorial here. Ok lets begin...
Open your web browser of choice and navigate to http://www.blackra1n.com. Click the Apple logo at the bottom of the screen.
When prompted save the download to your desktop
Then double click the downloaded blackra1n zip file to extract the application, then double click the application icon to launch the program
Make sure your iPhone or iPod is connected to the computer then click the large make it ra1n button
You iPhone will now be placed in recovery mode.
You will see a picture of GeoHot that replaces the regular recovery mode screen on your device.
blackra1n will run and then your device will reboot.
A popup message will appear informing you that BlackRa1n is free software and if you appreciate it you can donate to GeoHot at email@example.com.
Once your device reboots it will be jailbroken and you will notice a blackra1n icon on the Springboard. Make sure you have an internet connection and press to launch the application.
Choose the installer application of your choice then press to select sn0w if you would like to unlock your device. Press the Install button at the top right of the screen to begin.
BlackRa1n will begin to download and install the packages you selected.
If you chose to unlock device using blacksn0w you will be presented with a Post Install log for sn0w. CommCenter will be restarted and there is no need to reboot. If your carrier doesn't support 3G then disable it. Press the Close button to continue.
Once complete BlackRa1n will respring your iPhone and you will find the installer package of your choice on the Springboard.
Once you have confirmed your installer package is working correctly you may use the Uninstall blackra1n button inside the BlackRa1n app to remove it from your springboard.
***THANKS: A big thanks to Geohot for making this jailbreak and unlock possible. Also thanks to those who contributed to making it a success. You can donate to Geohot using the button below. Please note these donations go to Geohot and not to iClarified.