Well, that depends upon the phone that you're using. And if you're asking about a phone password or, say, an account password.
For Android, amongst the various flavors of Android, there's Settings->Lock Screen and Security. In there, there's stuff about the lock screen and type.
I've had the pleasure of mucking with Apple's iOS once, when acting as tech support to my sister-in-law with an i7. Similar settings were found in the settings on her phone; we set them up; and she uses the fingerprint and facial scanner stuff.
As far as Android goes: The different versions of Android (Lollipop, Marshmallow, Nougat, now Oreo) all had the settings menus in slightly different order. Further, different Android phones support different phone locks: All of them have PINs, all of them have Patterns, some have fingerprints, some have iris scanners, some can recognize faces, etc.
Same goes for iOS.
Feature phones (not smart phones) also have ways to lock the phone; but that varies even more than smart phones, depending upon the vendor.
So, if you want more and better details on how to do all that, reply with information about what phone you're running and with what version of OS software.
Finally: It's never been a great big secret on how to password protect (or lock screen protect, or whatever) a particular smart phone. Not that you won't find a ton of help around here, but it's, like, one of the most obvious things one will find out with, say, a Google search.
Did you still need help?