With my Samsung Android phone I had to call my carrier's customer support and obtain the unlock code from them. So it wasn't unlocked automatically after it was fully paid for. When I traveled to Europe I just bought a local carrier SIM from a vending machine at the airport.
Automatic unlocks is mostly an iPhone thing. iOS manages SIM locks differently (in fact on modern devices the modem itself isn't even locked, instead it's all done at the OS-level; Apple has a mapping of serial number to authorized carrier(s), to which the carriers can request changes remotely without having to provide an unlock code or requiring any user action).