You will need to jailbreak it first ( i recommend jailbreaking, it releases its full potential):
iClarified - iPhone - How to Jailbreak Your 2.0 3G iPhone (Mac)
Then in Installer/Cydia app there will be apps to unlock your phone to use any sim card with, i also use
iPod touch Fans a lot to help me out with my itouch, but iphone users can go there too.