have you setup a lock passward for you mobile phone? if not,contatc with your mobile phone provider or mobile network provider.I think it has something to do with the PUK no. The provider will give you a number such as "*...#".
Which unlock do you mean? If it is ordinary unlock there are simple lock code which you can use to unlock. If you want to unlock your mobile from network lock you can easily get the codes from many online providers like mobile-unlocker, who will provide you with codes and instructions to unlock. Following the instructions will unlock your mobile which is free to use with any network