system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do internet cables that go under the ocean simultaneously handle millions or even billions of data transfers?

I understand the physics behind how the cables themselves work in transmitting light. What I don't quite understand is how it's possible to convert millions of messages, emails, etc every second and transmit them back and forth using only a few of those transoceanic cables. Basically, how do they funnel down all that data into several cables?
gpt
In the earliest days of wire-based communication (analogue), there was only one signal on the wire at a time.

Later, we learned to pass multiple signals by using different frequencies/wavelengths for different signals. In it's simplest forms, imagine that instead of shining a white light down a wire for one signal, you're shining red, green, and blue lights. By measuring the amount of red, green, and blue light at the other end, you can separate the signals. That's the principle, just scaled up and with a bit of fiddly detail at each end. This gives us (with current technology) up to about 80 signals per strand of fiber. A cable can have dozens of fibers, so that's potentially a few thousand signals in a cable with a hundred fiber strands

But as you say, there are millions of data transfers... this part is fairly easy though. Although the signals appear to be fully simultaneous, we don't actually have a constant connection along each possible pathway: what we do is break our data up into chunks called "packets", and put an address on it of where it needs to go (your IP address).

That might sound strange, but think of it like sending things in the mail. Instead of having someone drive back and forth and give the message, we put them in packets, and send them down the road with an address on it.

Think of our cable as a road network. We make a road (a strand of fiber) and then we give it 80 lanes: those are our multiple signals. Now imagine we can overlap those signals so all 80 lanes are just one lane where the cars don't interfere with each other.

And then for each lane, we can send lots of individual cars (packets) down one after another, with their own destinations. We don't need to make a full connection (lane) between each pair of destinations, we just send everything down the shared lanes and let it split off when it needs to.

And then we combine a whole bunch of these roads (fibers) into one cable. So imagine we have 100 of these roads next to each other.