Howdy BASHA2,
Thanks for using the Apple Support Communities.
If you're wanting to learn more about using a passcode on your iPhone, then please look at the information in the article linked to below.
About iOS passcodes - Apple Support
Have a good one,
Alex H.