The unlocking of any mobile phone is required only when moving the device from one carrier's network to another compatible network. Unlocking a mobile device is the process of receiving and entering a special unlock code from a mobile carrier in order to activate a device on other networks.
Device locking is most common on GSM networks that use SIM cards. Some carriers allow devices from another GSM network to be used by removing the old SIM card and installing one from the new provider. Some devices may not be compatible with networks other than the one it is on due to factors such as differing radio band frequency or network types.