Contact the carrier to which the iPhone is locked to. They are the only ones that can authrize the unlock.
You were incorrectly informed.
An unlock begins with a request to the carrier the phone is currently locked to. They will determine if your request is valid, and if so, will inform you. Then, with that original carrier's SIM still in it, you would be instructed to plug the phone into iTunes and perform a restore, after which it would be unlocked (with confirmation of that in a message displayed at the end of the restore process).
Only then, would you insert another carrier's SIM card.