They use optical amplifiers, which take light at one wavelength and use it to intensify light at another wavelength. They're much like lasers (technically I think they count as optically-pumped lasers?), and they turn on from a very small input signal, effectively reenforcing it.
This can happen across multiple signals, on different wavelengths, in parallel. Like a broadband radio amplifier, it boosts everything across a large working bandwidth. There are even optical compressors (also powered by light), which speed up the baud rate of signals. That way a slow electronic system can produce the original pulses, and then they can be compressed to faster than electronics can work with, and then multiplexed with many other signals at different wavelengths, and this whole composite thing is sent down the line, amplified without decoding along the way, and then finally the whole thing is reversed at the other end.
This is the trick behind how fibre links are so fast, considering there are no electronics that can handle data serially at those speeds.