The present status of research and prospects for device applications of ferromagnetic (diluted magnetic) semiconductors (DMS) is presented. We review the nature of the electronic states and the mechanisms of the carrier-mediated exchange interactions (mean-field Zener model) in p-type Mn-based III-V and II-VI compounds, highlighting a good correspondence of experimental findings and theoretical predictions. An account of the latest progress on the road of increasing the Currie point to above the room temperature is given for both families of compounds. We comment on a possibility of obtaining ferromagnetism in n-type materials, taking (Zn,Mn)O:Al as the example. Concerning technologically important issue of
easy axis and domain engineering, we present theoretical predictions and experimental results on the temperature and carrier concentration driven change of magnetic anisotropy in (Ga,Mn)As.