If you purchased the phone outright, you should be able to get the unlock code from your carrier, although when you pay full price, the phones generally come unlocked. If the phone is under contract, then it will be up to the carrier to give you the unlock code, and even then you are still required to complete the terms of the contract. Many carriers will give you the unlock code if you are travelling outside their coverage area so you can use a local sim, but it's really up to them.
*moved to Samsung Galaxy S3*
This really isn't a root issue.