Credit cards are associated with a line of credit that the user usually pays in a deferred manner. That is, I bought something for 10 dollars, and those 10 dollars are NOT paid at the time of purchase (the bank, not the user, pay to the seller), but rather, they become a "debt" with the bank and the bank then charges you.
Debit cards are usually associated with a bank account that must have the funds to be able to make the purchase, that is, if I buy something for 10 dollars, I must have those 10 dollars in my account at the time of purchase.
All my life, I have only seen 16-digit cards, but searching on the Internet, it seems that they can have more or even fewer digits. I imagine that they are less common banking systems and therefore, more difficult to use in different parts of the world.