The three steps are -
Make sure your Galaxy S2 is fully charged.
To do the actual rooting, there are numerous methods but the method I believe to be safest and easiest is the ODIN way. To use this method, you'll need to download just 3 files -
a. ODIN3_v1.85 zip file,
b. The custom kernel. Go to Jayce Ooi to download the CF-Root-SGS2_XX_xxx_XXX-vx.x-CWMx.zip file that is for your kernel version. The trick to knowing which, is to goto Settings -> About Phone -> Kernel Version and note the name there.
Note the 5 characters in front of the I9100. Mine was XWKJ1. So I had to download CF-Root-SGS2_XW_LUX_KJ1-v5.0-CWM5.zip (by selecting XW_LUX_KJ1 on Jayce Ooi's page)
Download all these files and put them in the same folder. Unzip the ODIN zip file and run the ODIN program. Unzip the CF-Root-SGS2_XX_xxx_XXX-vx.x-CWMx.zip file to reveal the actual .tar file. Finally, unzip the SuperOneClick.zip file and run the SuperOneClick program.
Before we move to the next stage, I'll suggest you download all these other files you'll need for the entire process.
i. The Clockworkmod Recovery zip file
ii. The Cyanogenmod 9.1.0 zip file
iii. Google apps zip file
Copy Cyanogen 9.1.0 zip and the Google apps zip files into the phone memory (not the SDCARD memory).
Disconnect the USB.
Make sure USB debugging is on.
Now power off the phone and boot into the download mode by pressing these buttons at once till the phone powers on - the power button, home button and volume down button. You'll get a screen like the one below (press volume up to continue when prompted) -
Now connect the phone via USB to the computer (on which you have the ODIN program). Wait till you see a message in the ODIN terminal.
Click on PDA to select the custom kernel you earlier downloaded. Click on Start to install the custom kernel.
The phone will reboot when done.
Once the phone is done booting (make sure the USB is still connected), go to the SuperOneClick program (earlier opened) and click on Root.
Voila! Your Galaxy S2 is now rooted.
And as a plus, you should go to the Google Play store and install Titanium Backup. Use it to backup all your phone applications and data to the external memory card. Also install SMS backup + to backup your phone calls history and SMS to your gmail account. It will come in handy when you're done with the installation of CM 9.1.0.
2. Install Clockworkmod Recovery
Now disconnect the phone and reboot into the download mode again. And this time, when you click on PDA, select the clockworkmod recovery file you downloaded and click Start.
Once again the phone will reboot.
Now you can move to the last stage.
3. Install the Cyanogenmod 9.1.0
Turn off the USB debugging mode.
Power off the phone. Boot into the Recovery mode by pressing Power button + Home button + Volume Up button (note that it's volume UP button).
You'll get a screen like the one below -
Navigate with the volume keys to Backup and Restore, made a backup of the phone. Select yes in the prompt with numerous "no" and 1 "yes".
Then press the Power button lightly to move to the previous menu, and select install zip from sdcard. If you do not see the CM 9 and gapps zip files, do not panic! Just keep scrolling down via the volume down key and you'll soon see them. Install the CM 9 zip first and then install the gapps zip.
Finally, press the power button repeatedly till you are back at the parent/home menu, and select wipe cache partition. Wipe all the caches.
Then go back and select Reboot.
You will now get a new boot screen, your phone is now running on the ICS4.04 customized by Cyanogen!
The best part is that you can simply head to Google play store and install Titanium Backup, run and restore all your applications and data. Then run the SMS Backup + to restore your SMS and call history. Also don't forget that Google always sync (except you disabled it) your phone contacts with your Google account, so your phone contacts are automatically restored.