Any system that involves either a "push-pull" arrangement, so a loco at one end and a driving trailer of some sort at the other (eg Class 91+MK4s+DVT), or a loco at either end (eg HST), essentially relies upon a jumper cable which runs the entire length of the train and relays relevant control inputs from the driving end to whatever is on the rear. In the case of locomotives, this tends to be via a separate jumper cable, whereas on a modern multiple unit (Sprinter etc onwards, pretty much) this will usually come through the coupler units.
To give an idea, HSTs use a '36-way' jumper cable; so there are 36 individual cables within the jumper, each of which can relay a different signal or command from one power car to the other. The Southern Region of BR developed its own variant with 27 wires, which was fitted to all of it's MK1-based 'Slammer' electric multiple units as well as several classes of locomotives, which meant that pretty much anything on the Southern could work in multiple with anything else. A very simple but well thought through idea, giving total flexibility. So clever was this system that there is now a preserved 'Slammer' somewhere on a heritage line, which can be attached to their resident Class 73 and then driven from within a cab of the electric unit, despite there being no third rail, the cab controls of the EMU driving the loco attached to it.