All the various lock settings can be found at Settings>Phone>Phone Management>Security Settings>Phone and SIM card. You can set your phone Sim PIN as well as your phone lock code here.
The PIN code is a 4 digit pin for the SIm card which is available from your service provider. Too many failed attempts and you wilkl need what is called the PUK code to unlock and this is also available from your service provider. Either way, you will need to contact your service provider.
Have a look at the link below for more information on the various codes.