Some acids can give up more than one proton: carbonic acid ($\mathrm{H_2CO_3}$), sulfurous acid, phosphoric acid ($\mathrm{H_3PO_4}$), and vitamin C. Each proton comes off in its own step, each a weak-acid equilibrium with its own $K_a$.
🔑 Key idea
The constants fall steeply: $K_{a1} \gg K_{a2} \gg K_{a3}$, usually by a factor of $10^4$ or more. So the pH comes almost entirely from the first step, treated as a single weak acid. In a solution of the acid alone, the concentration of the ion made in the second step, $[\mathrm{A^{2-}}]$, is about equal to $K_{a2}$.
💡 Why it works
Taking a proton from a neutral molecule is easier than taking one from an anion that already has a negative charge, and harder still from a 2− ion: the leftover charge holds the next proton back. Also, the $\mathrm{H_3O^+}$ from step 1 pushes step 2 backward (a common-ion effect). In $K_{a2} = \dfrac{[\mathrm{H_3O^+}][\mathrm{A^{2-}}]}{[\mathrm{HA^-}]}$, step 1 makes $[\mathrm{H_3O^+}] \approx [\mathrm{HA^-}]$, so they cancel and $[\mathrm{A^{2-}}] \approx K_{a2}$.
A diprotic acid titrated with NaOH shows two steps, one for each proton, because the two pKa values are far apart.
Worked examples
✏️ Worked example: Vitamin C
Ascorbic acid, $\mathrm{H_2C_6H_6O_6}$, has $K_{a1} = 8.0 \times 10^{-5}$ and $K_{a2} = 1.6 \times 10^{-12}$. For a $0.10\ \text{M}$ solution, find the pH and the concentration of $\mathrm{C_6H_6O_6^{2-}}$.
Adding up the $\mathrm{H_3O^+}$ from every step as if each step ionized as much as the first, or as if a diprotic acid gave $2C$ of $\mathrm{H_3O^+}$. Later steps start from a far smaller amount and have far smaller constants. Check: compare $K_{a2}$ with your $[\mathrm{H_3O^+}]$ from step 1; it will be many powers of ten smaller.
Sulfuric acid is the exception you meet most: its first proton is strong. Its second, $K_{a2} = 1.2 \times 10^{-2}$, is weak but large enough that it must be solved as its own equilibrium in dilute solutions.
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.