Yup, up to the carrier if it's carrier-branded. They would either send you a code or, like T-Mobile, there will be an app installed in your phone that'll do it for you. If the carrier refuses (in regions where it's not mandatory for them to unlock), then your only option is to get an unlock code from a 3rd party service (usually paid services).
Oh, and if you're on Verizon, the phone is already unlocked.