The working mechanism of photoswitches involves the absorption of photons, which provides the energy needed for structural changes. These changes can involve alterations in the conformation or the electron distribution of the molecule. Common types of photoswitches include azobenzenes, spiropyrans, and diarylethenes, each of which undergoes specific, reversible transformations upon irradiation with light.