The muon anomalous magnetic moment is one of the most precisely measured quantities in particle physics. In a recent experiment at Brookhaven it has been measured with a remarkable 14-fold improvement of the previous CERN experiment reaching a precision of 0.54ppm. Since the first results were published, a persisting "discrepancy" between theory and experiment of about 3 standard deviations is observed. It is the largest "established" deviation from the Standard Model seen in a "clean" electroweak observable and thus could be a hint for New Physics to be around the corner. This deviation triggered numerous speculations about the possible origin of the "missing piece" and the increased experimental precision animated a multitude of new theoretical efforts which lead to a substantial improvement of the prediction of the muon anomaly aµ = (gµ − 2)/2. The dominating uncertainty of the prediction, caused by strong interaction effects, could be reduced substantially, due to new hadronic cross section measurements in electron-positron annihilation at low energies. Also the recent electron g − 2 measurement at Harvard contributes substantially to the progress in this field, as it allows for a much more precise determination of the fine structure constant α as well as a cross check of the status of our theoretical understanding.In this report we review the theory of the anomalous magnetic moments of the electron and the muon. After an introduction and a brief description of the principle of the muon g − 2 experiment, we present a review of the status of the theoretical prediction and in particular discuss the role of the hadronic vacuum polarization effects and the hadronic light-by-light scattering correction, including a new evaluation of the dominant pion-exchange contribution. In the end, we find a 3.2 standard deviation discrepancy between experiment and Standard Model prediction. We also present a number of examples of how extensions of the electroweak Standard Model would change the theoretical prediction of the muon anomaly aµ. Perspectives for future developments in experiment and theory are briefly discussed and critically assessed. The muon g − 2 will remain one of the hot topics for further investigations.