What the number actually identifies
An NDC answers three questions in order: who put their name on this package, which formulation is inside it, and how much of it is in the box. Nothing more. It is an inventory identifier, not a licence, not an approval and not a statement that the product is currently available.
That distinction matters in practice. A drug can hold a perfectly valid NDC and still be unapproved, discontinued or under recall. Presence in the FDA's directory means the labeler filed a listing, and listings are self-reported.
Who has to have one
Every drug marketed in the United States must be listed with the FDA and receive an NDC — prescription and over-the-counter, brand and generic, human drugs of every kind. Registration is annual, so a product whose labeler fails to recertify drops out of the current file even though it is still on shelves.
Why the same drug shows two different codes
The FDA publishes NDCs in a 10-digit form. HIPAA electronic transactions require a fixed-width 11-digit form. The two are the same code in different clothes, and the conversion between them is the single most common source of drug-claim errors.