What does an unlocked phone mean?
If a phone is unlocked, it means that:
1. the manufacturer of the phone has published instructions for how to unlock it; or
2. technical unlocks are available and legal in your country.
Phones may still be locked because carrier agreements require them to be so, even if there’s no good reason on the user side. Manufacturing contracts sometimes specify that phones being manufactured for such company by another company cannot be unlocked. Sometimes owners lock themselves into an early payment where they’re unable to have their phone unlocked when contract ends without paying substantial penalty — which may vary from paying the entire purchase price of the phone up-front (regardless whether you’ve finished making payments or not), forced service with said provider for a period of time, or forfeiting the remaining amount of money you owe on your contract.