Depending on which iphone you have it can be easy or impossible.
2G iphone cannot be unlocked to any network (yet) although it can be jailbroken to use cracked apps.
1G iphone can be unlocked to use any network. Do a google search for the software to do it. (I don't want to breach any forum rules on breaching copyright etc...)
If you need more info, PM me.
If there is a 'simlock' i.e someone has set a numeric password to be entered before the phone can be used...have you tried changing sim? restoring firmware?
BTW, iPhone is not compatable with 3G network...I assume you meant 2G
**EDIT** After some research, it appears that the '3G' phones
CAN be unlocked, just ensure your firmware / baseband is compatable with the tool.
Also, by 1G I meant the early first generation Iphones (metal and black backs) and by 2G I meant the latest phones with the plastic backs and GPS built in...