Setting a Passcode for Data Protection in iOS6
Setting a passcode help protect your data stored not only on the device, but also the data you can access from other sources. If the device is either lost or stolen, it will be harder to access that data.
Go to SETTINGS on the device and tap on the GENERAL option.
Under GENERAL turn on PASSCODE LOCK.
ENTER PASSCODE (enter a passcode that is easily remembered by you, but not easy to be guessed).
Once you have entered your passcode, you are able to change how long it takes for your phone to lock and to require a passcode to unlock. The default is set to immediately. This is the best option, but if you choose to change it, we recommend not using anything past 5 minutes. If you leave your phone someplace, the longer time you have it set to lock, the longer someone has to gain access to your data and personal information.
For added protection you can choose to have the device erase all the data automatically after 10 failed attempts to enter a passcode. To do this, just enable the option under the ERASE DATA option under the PASSCODE LOCK setting.