you will need a cp and a wireless internet then folow
1-connect ur iphone to itunes and up date it to os4
2-activate wireless in ur iphone and browes safari adrees jailbreakme.com
3-wait for down load till the end when u see cydia is added slide ur iphone unlock swich to the right and wait for process to finish,this will jail break ur iphone
4-to unlock ur phone click on cydia ,manage,sources,you should see ultrasn0w ,click on it,install and confirm install,when finish reboot ur phone by swich off and on
ur phone is jail breaked and unlocked
pls note after step 2 u can disconect ur phone from cp
have fun
hope this will help