Spectroscopy in AFM involves measuring the interaction forces between the AFM tip and the sample as a function of distance. This technique provides detailed information about the material properties at the nanoscale. Common types of spectroscopy used in AFM include force spectroscopy, conductive AFM, and Kelvin probe force microscopy.