Macroscopic magnetic properties of nanostructured and nanocomposite systems