Distributor caps and rotors are responsible for passing the electric power from the ignition coils to the engine's cylinders in order to combust the fuel-air mixture inside and power the engine. The coil connects directly to the rotor, and the rotor spins inside the distributor cap. When the rotor's tip passes a contact on the cylinder, a high-voltage pulse travels from the coil to the cylinder via the rotor. That pulse jumps the little gap between contact and rotor and moves on to the spark plug wire, eventually igniting the spark plug on the cylinder.
The distributor cap and rotor are part of the ignition system, which has to work in concert with the rest of the engine in order to ignite the air gas at the proper time. The idea is to maximize the output of the expanding gases in the engine by lighting them so that they produce heat and the fuel turns to exhaust. The exhaust increases the pressure in the cylinder and pushes the piston down. The idea is to create as much pressure as possible inside the cylinder, thereby maximizing torque and power. Plus, the more efficient the cylinders are, the better the vehicle's mileage will be.
Therefore, the real catch to the coil-distributor-cylinder system is timing. Since there's a short delay between when the spark is created and when it ignites the fuel in the cylinder, the spark has to happen before the piston reaches the top of its stroke. That way, by the time the spark arcs its way across the gap between the rotor and the cylinder, the piston will just reach the top of the stroke and the pressure will be able to build up as it descends into its power stroke.