first you have to download the original 3.1.2 software.
Then you have to jailbreak. which will allow you to go to the menu, but you will not be able to communicate with the network until you unlock it.
after jailbreaking, you can unlock the iphone.
following are some good tutrials. there are...