STED works by using two lasers: an excitation laser and a depletion laser. The excitation laser illuminates the sample, causing fluorophores to emit light. The depletion laser, which is shaped like a doughnut, deactivates the emission around the periphery of the excited area, leaving a very small spot of fluorescence. This significantly enhances the resolution of the image.