Optical amplifiers work by using a medium, often doped with rare-earth elements like erbium, to amplify the light passing through it. When a weak optical signal enters the medium, it interacts with the excited ions, causing them to emit additional photons that are coherent with the incoming signal. This process is called stimulated emission, and it boosts the power of the original signal.