Controlling the Electromagnetic Properties of Magnetic Composites and Metamaterials