Generally, there will be two reasons for the device to be locked upon inserting a new SIM card:
If you originally received your device from one network provider, the network provider may have locked the device to their network.
Samsung does not lock any of its devices to any particular network. You will need to contact the original service provider or retailer to request an unlock code.
Some service providers may allow you to unlock the device for a small charge or for free, whereas others may not allow the device to be unlocked at all.
Some Samsung smartphones work only with SIM cards issued from mobile networks from a certain region. This region should normally be found on your device's packaging when you purchase it.
So for example, if you buy a smartphone in one country, it may not work if you try use it in a different country with a SIM card from that country.
If this happens, you will need to speak to Samsung customer support regarding unlocking the phone. Customer support contact details are here or scroll down to see the full range of contact options below.
If you're experiencing unusual behaviour on Samsung mobiles, tablets or wearables, you can send us an error report or ask us a question in the Samsung Members app.
This allows us to a closer look at what is happening. The data is anonymised and only held for the duration of the investigation. Find out more about sending an error report through the Samsung Members app.