How did I get service on my locked iPhone uk?

I got this locked iPhone its not stolen
And today i tried this new sim not the network it's locked from
A new sim
Sim was not activated
After insterting sim my phone restarted and asked me to connect to a network something i saw 2 bar service and it said 3G but it asked to join a network i got scared and took the sim out

Is this phone unlocked

If your phone is an unlocked phone, you should be able to use it after inserting a new sim card. Try to choose a network, if it still doesn't work I suggest that you apply to a remote unlock service for them to unlock it.