Consider the dissociation of a weak acid, HAHA:
HA rightleftharpoons H^+ + A^-HA⇌H++A−. As we know,
K_a = {[H^+][A^-]}/[[HA]],Ka=[H+][A−][HA],
and log_10{K_a} = log_10[H^+] + log_10{{[A^-]]/[[HA]]}andlog10{Ka}=log10[H+]+log10{[A−][HA]};
Equivalently (multiplying each by -1−1,
-log_10{ K_a} = -log_10[H^+] - log_10{{[A^-]]/[[HA]]}−log10{Ka}=−log10[H+]−log10{[A−][HA]}.
But, by definition, -log_10{ K_a} = pK_a−log10{Ka}=pKa, and -log_10[H^+] = pH−log10[H+]=pH.
Therefore, pHpH = pK_apKa ++ log_10{{[A^-]]/[[HA]]}log10{[A−][HA]}. This is a form of the buffer equation, with which you are going to get very familiar.
Now at half-equivalence, by definition, [HA] = [A^-][HA]=[A−], and since log_10 1log101 = 0, when plugged back into the equation, pH = pK_apH=pKa. So, in order to measure pK_apKa values of weak acids we plot a titration curve with a pHpH meter, and note value at half-equivalence.