A considerable effort has been devoted to understand the origin of ferromagnetism, often persisting up to above room temperature, in a number of semiconductors doped with transition metals. In the talk, I will argue that ferromagnetic DMS can be divided into three categories. The first consists of (Ga,Mn)As and related compounds. Here, theory built on Zener's model of carrier-mediated ferromagnetism and the Kohn-Luttinger kp theory of semiconductors describes thermodynamic, micromagnetic, optical, and transport properties. To the second group belong compounds, in which the proximity of the localisation boundary and/or a competition between long-range ferromagnetic and short-range antiferromagnetic interactions leads to an electronic nanoscale phase separation that results in characteristics similar to colossal magnetoresistance oxides. Finally, in a number of compounds a chemical nanoscale phase separation is observed, reminiscent of spinodal decomposition. Mechanisms accounting for this effect in particular materials will be discussed.The work is supported by NANOSPIN E.C. project (FP6-2002-IST-015728), by Humboldt Foundation, and carried out in collaboration with M. Sawicki, K. Osuch, H. Przybylińska, M. Kiecana, and A. Lipińska in Warsaw, as well as with groups of H. Ohno in Sendai, S. Kuroda in Tsukuba, K. Trohidou in Athens, J. Cibert in Grenoble, J. Jaroszyński in Tallahassee, and A. Bonanni in Linz.