For better security, you can set a passcode that must be entered each time you turn on or wake up iPhone.
Set a passcode. Go to Settings > Touch ID & Passcode (iPhone 5s) or Settings > Passcode (other models), and set a 4-digit passcode.
Setting a passcode turns on data protection, using your passcode as a key to encrypt Mail messages and attachments stored on iPhone, using 256-bit AES encryption. (Other apps may also use data protection.)
Increase security. Turn off Simple Passcode and use a longer passcode. To enter a passcode that’s a combination of numbers and letters, you use the keyboard. If you prefer to unlock iPhone using the numeric keypad, create a passcode using numbers only.
Add fingerprints and set options for the Touch ID sensor. (iPhone 5s) Go to Settings > Touch ID & Passcode. See Touch ID sensor.
Allow access to features when iPhone is locked. Go to Settings > Touch ID & Passcode (iPhone 5s) or Settings > Passcode (other models). Optional features include:
Allow access to Control Center when iPhone is locked. Go to Settings > Control Center. See Control Center.
Erase data after ten failed passcode attempts. Go to Settings > Touch ID & Passcode (iPhone 5s) or Settings > Passcode (other models), then tap Erase Data. After ten failed passcode attempts, all settings are reset, and all your information and media are erased by removing the encryption key to the data.
If you forget your passcode, you must restore the iPhone software. See Restore iPhone.