The default code is 12345.To change the code, select Menu > Tools > Settings > General> Security > Phone and SIM card > Lock code.  (Or in some devices, Menu > Settings > Phone > Phone mgmt. > Security settings > Phone and SIM card > Lock code.)