Magnetic properties of diluted magnetic semiconductors