Go to Settings> Security & Privacy> Device Lock> Lock Screen. You can then choose Swipe, Pattern, PIN, or Password for the lock screen.
Note:
If you or someone else enters the wrong passcode too many times, your device will disable itself temporarily.