An analytic expression is given for the inverse Faraday effect, i.e. for the magnetization occurring in a transparent medium exposed to a circularly polarized high-frequency electromagnetic wave. Using a microscopic approach the magnetization of the medium due to the inverse Faraday effect is identified as the result of microscopic solenoidal currents generated by the electromagnetic wave. In contrast to the better known phenomenological derivation, the microscopic treatment provides important information on the frequency dependence of the inverse Faraday effect.