The three-loop vacuum polarization function $\Pi(q^2)$
induced by a massive quark is calculated. A comprehensive
description of the method is presented.
From the imaginary part the ${\cal O}(\alpha_s^2)$ result
for the production of heavy quarks
$R(s)=\sigma(e^+e^-\to \mbox{hadrons})/\sigma(e^+e^-\to \mu^+\mu^-)$
can be extracted. Explicit formulae separated into the different
colour factors are given.