Organic chemistry · Substitution and elimination
A substitution only happens if the group on carbon is willing to leave, and pKa values tell you which groups are.