We investigate the structural defects dynamics and the mechanical properties of solids and granular materials by using mechanical spectroscopy. In solids, dislocation dynamics and co-operative effects of dislocations interacting with obstacles are studied by low and high frequency internal friction measurements compared with an original acoustic coupling technique. To study the nanoscale mechanical properties such as nanoscale relations between tribology and adhesive properties of materials, acoustic near field scanning atomic force microscopy is used. In vibrated granular materials, the jamming process and the fluctuation-dissipation theorem are evidenced by means of a modified inverted torsion pendulum at low and high amplitudes of the applied vibrations, respectively. In fine-grained ceramics such as alumina, zirconia, silicon nitride and in ceramic matrix composites, we study the grain boundary sliding and accommodation processes, which are responsible for creep. The development of high damping metallic materials is achieved by the processing of metal matrix composites, such as magnesium reinforced with SiC or C or alumina fibres. In these composites the interface stress relaxation is analysed by low frequency mechanical spectroscopy. As it concerns industrial applications, our research is focussed on the study of mechanical properties of hard materials such as steels and hardmetals that are used for cutting tools and wear applications. Our experimental strategy involves a multi-scale approach involving on one hand the study of macroscopic deformation, wear and fracture and, on the other hand, the study of the mobility of structural defects by mechanical spectroscopy and the investigation of residual stress by neutron and x-ray diffraction.