Just think of the following arrangement. You have a battery a switch and a bulb in a circuit. If you turn the switch off and on, the light goes off and on. Now, make the wires to the bulb longer and put it in a different room, and you can transmit your switch inputs to someone else who watches the bulb. If you know morse code, or agree on a sequence of flash's of various lengths to represent each letter and digit you are interested in, you can transmit any text you want to the other person.
Now, just think of the computer sending data as the switch, which is what they are doing at the lowest level, and the bulb as the computer receiving the data, much like a relay, and you have a communications line. Of course computers can switch things off and on at a huge speed and some very clever coding systems are used so you can push a lot of "information" through the "wire".
The details are obviously far more complex, as are the codes used to represent information. There are also complexities in the "switch" and "bulb/relay" that make it work faster and more reliably, but the basic idea holds. One end switchs the electricity on and off, and the other end monitors this and uses the pattern to identify the data being sent.
Hope that helps.