By default, your iOS device (iPhone / iPad / iPod touch) only uses a four-digit pin number (called "passcode") to prevent unauthorized access. If your device includes Touch ID, you'll probably always use your fingerprint instead. I'll show you how to change your iPhone's 4-digit pin, and how to create a password that is longer or uses letters as well - this makes your device much more secure!
First, launch the Settings app (gear icon). If needed, go back to the first page of options. Scroll down until you see "Touch ID & Passcode", and tap on it. Enter your current pin to continue (this prevent others from changing it).
To make your iPhone / iPad stop asking for a password, tap "Turn Passcode Off". To pick a new pin, tap on "Change Passcode" instead. Re-enter your current passcode for confirmation. On that screen, either type a new, up to 6 digits long passcode (if you upgraded to iOS 9), or tap "Passcode Options" for more flexibility. Pick Custom Numeric Code to use more numbers, or tap on Custom Alphanumeric Code to be able to use letters in your password.
Type your new numeric passcode or text password, and tap Next in the top right corner. Re-enter it a second time, to avoid typos, and tap Done. If you get the "Use new passcode as iCloud security code?" popup, make a choice: using the same code everywhere is less secure, but also more convenient. If you picked a letter password, you'll see a regular keyboard on the lock screen.
Back on the passcode settings screen, Apple lets you control what your phone or tablet can do when locked. Voice Dial, Today, Notifications View, Siri, Reply with Message, and Wallet are all enabled by default. Tap on their switch to disable them when your device is locked. Enabling Erase Data at the bottom will automatically wipe it after 10 unsuccessful password attempts (use Find my iPhone instead!) You can also change how soon your device locks itself.