Pyroelectricity refers to the ability of certain materials to generate a temporary voltage when they are heated or cooled. This phenomenon is a result of changes in the temperature causing a shift in the positions of atoms within the crystal structure, leading to an imbalance in the electric charge distribution.