In the old systems, the distributor was connected to the engine cam shaft and the spark was sent to the cylinders by the mechanical rotation of the distributor shaft. The rotor would turn and make contact with the rotor and then the distributor cap plug wires sending a spark through the wires to the spark plugs. With newer systems, this is done electronically where sensors (like crank shaft sensor and cam shaft sensor) tell the computer where the engine is in the operating cycle and then send the message to the distributor to send spark to the proper cylinder. If you want to go way back, you had points in the distributor that made a circuit through the ignition coil. When the points open by the distributor, the current jumped in the coil creating a big spark that traveled into the distributor, through the rotor cap, and then the the spark plug wires in the distributor cap. As I said previously the function of the points is done electronically and we often have individual coils at each plug or withing the distributor to cause the spark to the cylinders at exactly the right time.
The old distributors rarely failed because they were just a shaft that turned in an distributor housing. You routinely changed the distributor cap, rotor, points, and condenser (usually about every 12,000 miles) but never changed the actual distributor. Today, when a distributor fails today, it is the electronics that fail thus necessitating the need to change the distributor.