Optical transistors operate by utilizing the properties of light (photons) to control the flow of optical signals. They typically involve materials with nonlinear optical properties, such as semiconductor quantum dots or photonic crystals. When a control light signal is applied, it changes the refractive index or absorption properties of the material, thereby modulating another optical signal. This modulation mimics the switching behavior of traditional transistors but at much higher speeds and with lower energy consumption.