There is no single code that can unlock any phone, since a unique unlock code is needed for the specific phone's serial number. People can usually contact their mobile providers to request unlock codes if certain conditions are met. The mobile providers have to request the codes from the phone manufacturer and then send the code to the phone owner.
In order to get an unlock code, the customer may be required to have service for a specific amount of time, meet contract requirements, not have any overdue account fees and comply with a waiting period for recently purchased devices. Carriers may set additional requirements for requesting the code, and personal information, such as part of the customer's social security number, may be requested.