You would need a puk code which usually has to unlocked by your previous provider. If you have a Samsung phone then they could provide one if you contact them.
Hi I need a new pin for my phone as my SIM card is locked.
Some good info from cappaj from his S7 and the messages he got.
"SIM network PIN blocked. Enter SIM network PUK."
- This is asking for Samsung's "master code" - I got this after entering the wrong code for the message below too many times. Samsung and/or your previous carrier can give you this.
"SIM network unlock PIN"
- This is asking for your previous carrier's unlock code - just contact them with your IMEI and they'll give it to you easy peasy. If you enter this incorrectly too many times, you'll get the error message above.