Device Passcode
Modern versions of iOS/iPadOS use a six digit Passcode to unlock the device.
The Passcode unlocks the built-in security chip (the “Secure Enclave”); when unlocked, the Secure Enclave releases an encryption key that allows the Operating System to access and decrypt stored system data. When locked, all sensitive data on your iPad remains securely encrypted - and cannot be accessed.
It is possible, should you choose to do so, to change the default six digit Passcode to a freeform alpha-numeric Passcode.
The device Passcode is set per-device; the Passcode does not synchronise with other devices or services. It’s sole purpose is to protect the iPad itself. Each of your devices can use the same or different Passcode.
AppleID and Password
Your AppleID and associated Password are used to access data stored and/or synchronised with iCloud. The AppleID Password is entirely independent of, and unrelated to, the device Passcode. As your AppleID and associated Password are used to secure iCloud storage and services, the AppleID credentials are common to all your devices.
It is possible, should you choose to do so, to manually set the AppleID Password to be the same as your device Passcode.
If using the default system settings, if challenged for a Passcode, you will know that a six digit code (that relates to the device) is required. Conversely, if challenged for a Password, then your AppleID/iCloud Password is needed.
I hope this clarification as to the purpose and format of both Passcode and Password helpfully resolves any confusion.