Impedance spectroscopy is used for the characterization of materials, such as electroceramics, solid and liquid electrochemical cells, dielectrics and also fully integrated devices, such as fuel cells. It consists of measuring the electrical impedance - or a closely related property, such as admittance or dielectric constant - as a function of frequency and comparing the results with expectations based on physical, chemical, and microstructural models. This article reviews the principles and practical aspects of the technique, the representations of the results, the analysis of data, and procedures for the correction of measurement errors. The applications of impedance spectroscopy are illustrated with examples from electroceramics and polymer-based dielectric systems. The way in which the technique is applied to the two classes of materials is compared with reference to the different models used.