One ship pulls up alongside the other. The captain of one ship sends a message to a sailor on deck. A sailor on the deck of the other ship sees the Morse code message, decodes it into English, and sends the message up to the captain. The transmitter is like the sailor on the deck of the sending ship. The transmitter is physically close to the optical fiber and may even have a lens to focus the light into the fiber.
Lasers have more power than LEDs, but vary more with changes in temperature and are more expensive.
Therefore, one or more optical regenerators spliced along the cable to boost the degraded light signals. When the degraded signal comes into the doped coating, the energy from the laser allows the doped molecules to become lasers themselves. The doped molecules then emit a new, stronger light signal with the same characteristics as the incoming weak light signal. The optical receiver is like the sailor on the deck of the receiving ship. The receiver uses a photocell or photodiode to detect the light.