The industry group CTIA announced the change in the code today. All carriers will be required to unlock their phones at a customer's request. Certain conditions will have to be met -- and it's important to also know that not all cell phones can work on another carrier, since some use different technologies (a phone that operates on the GSM standard will not work on a carrier that is CDMA, for instance). However, carriers will no longer be allowed to block their phone.
If you have a phone which you got at a subsidized low price and for which you have a monthly fee that pays off the phone over the life of your contract, carriers will have to unlock the phone after a customer is in good standing by fulfilling "postpaid service contract, device financing plan, or payment of applicable early termination fee." (In English, that means you have to have paid off your phone first.)
Prepaid phones are a easier. When requested, a carrier must unlock a handset "no later than one year after initial activation."
All unlocking must be completed within two days of getting a request. Also, carriers now must let customers know about their policies.
The CTIA code is voluntary, though members of the organization must adhere to it. This all was given a big push forward when President Obama signed legislation last August that legalized unlocking, something that had not been allowed previously because of a ruling by the Library of Congress back in 2012.
The code now says -- "Carriers that lock devices will clearly notify customers that their devices are eligible for unlocking at the time when their devices are eligible for unlocking or automatically unlock devices remotely when devices are eligible for unlocking, without additional fee. Carriers reserve the right to charge non-customers/non-former-customers with a reasonable fee for unlocking requests. Notice to prepaid customers may occur at point of sale, at the time of eligibility, or through a clear and concise statement of policy on the carrier's website."
If you're interested, here's a more detailed article how to go about this all.