If you wish to unlock your smartphone for using an international SIM card or changing your carrier, you could do it until now but not anymore as it is against the law. But, this debate is largely baseless as you can still unlock your phone while not ending up going to a jail. The way you do that, however, is illegal. On the other hand, it is legal if your wireless carrier does it for you and they can surely do it under certain conditions. All they would require is for you to be a customer for a certain time and your account to have a good standing with all your bills paid for.
This debate regarding phone unlocking recently started when unlocking was not included as an exemption in the Digital Millennium Copyright Act as was done twice previously. So, it technically became an illegal issue to unlock a phone on your own. But, this debate took a turn when the Unlocking Technology Act of 2013 bill to make unlocking illegal was supported in the House of Representatives. In addition, the Obama administration also said that phone unlocking and carrier changing rights should rest with the consumers. So, you would probably be safe in unlocking your phone on your own, but should still prefer to go to a wireless carrier to keep it official.
Wireless carriers suggest that they would unlock your phone if you make the full payment for the phone and forgo the subsidy on your bills. On the other hand, every wireless carrier has its own unlocking policies if you have not paid upfront for your phone. For example, AT&T does that when the account standing is good and first 60 days of a wireless service contract have gone past. Sprint does the same after 90 days of service and only for its GSM-capable handsets. While T-Mobile has a policy similar to Sprint’s, Verizon Wireless unlocks your 3G handsets if your account has a good standing and is over six months old. Verizon’s 4G phones are not locked and can be used with a different SIM card outside the country.
However, you get your phone unlocked, the important point if to follow the laws and take suggestions from your wireless carrier about phone unlocking. A simple unlocking would not make your phone ready for all carrier networks. In addition, violating any wireless contract terms could get you penalized for it.