Re: How do you unlock Samsung Galaxy 4
In order to get the unlock code from your carrier, the phone has to currently be on an active account with the carrier. They usually make you fill out a form and you have to wait for the unlock code in an email - and it can take a week or so. And that's US law - in other countries you my have to buy the unlock code, as Andrew indicated.
BTW, if you're using a cheaper network provider, but the same carrier (IOW, say it's an AT&T phone, and you get a Straight Talk AT&T SIM, you don't have to unlock the phone. It's locked to the carrier, not to the network provider.)