Android users who bought their Android phones off a 3rd party(like Ebay or other people), mat soon realize that the device will not work with their mobile cell phone provider. The reason for this is because Android phones are "locked" to one carrier. Like IPhones, Android software is designed to keep you loyal to one company. However, there is a process to unlock most Android phones. This process is device specific and can be usually found on the internet.
Nonetheless, the general procedure is still the same, you must obtain the unlock code to unlock an Android Phone. Also, be sure to do some Google-ing/research before you make any attempt to unlock a phone; there may be some unforeseen consequences down the line if you are unprepared.
T-Mobile: Typically you must have a contract with them before they will give you a Unlock code. T-Mobile will provide the code and instructions under certain conditions. Give them a call at their customer service and they will be happy to assist you. Keep in mind that you are entitled to receive an unlock code and may want to push the issue especially if you are a loyal customer(the long-term traveling excuse usually works). Nokia: There are free online calculators to give you the unlock, try searching "Nokia Unlock Code" and put your Google skills to the test. Simply type in the code that you receive into the phone and it is good to go.
Verizon: These are Sim-less phones. They will forever be bound to Verizon. You are out of luck, return it now.
AT&T: AT&T typically provides the unlock code under these conditions. Give them a call at 1-800-331-0500. - Not an exclusive device by AT&T - Active account & in good standing for 90 days or longer - If the phones Unlock Code is available from the Manufacturer
Misc Unlock Phones / Third Party: Finally, other locked phones may require device specific tasks/components. For example, you may need to purchase the code from a specialized website, buy some cables/hardware, or maybe even pay for some unique servicing fees. There is even a universal sim-unlocker that could be the perfect solution for your device.