Based on your settings, your Nokia phone may ask for the security code at the time of power on, when sim card is changed or for changing some settings. The default security code for all Nokia mobile phones is 12345. This is the code that is set at factory and this is the code that your phone came with when you first bought it. If you have never changed the code, 12345 is still your code. But if you changed the security code and forgot it then you have two options.
1. Visit Nokia Care and they can reset the security code. Carry your bill just in case they ask. I think they charge around Rs.200/- for this. Local mobile service shops can also do this, but having it done at Nokia care is what I suggest.
2. Visit http://www.nfader.su and follow the instructions there. Every Nokia phone has a master code, when you enter your imei in the form on this website, it gives you the master code for your phone immediately. You can use this code to change your security code. Read the FAQ and other stuff on the site before doing so that you know what you are doing. I think the code will not work if you have already tried a wrong code too many times on your phone. I successfully changed the forgotten code for my Nokia 3100 using this website, but did not succeed with it for my Nokia 2630. I’m still using the 2630 without knowing the code. So try your luck.
There are more sites like the one above, just google for “Nokia master code” or “Nokia security code reset” and you should find a plenty. The site I suggested above is the one I used and it worked for me. Other way is flashing the phone, but it’s good to have it done by Nokia Care.