Ignition-Distributor
Ok so we know how the spark happens, but how does 
the spark happen at the right time?  (just before the 
piston reaches the top of the compression stroke)  The 
timing of the spark is controlled by a distributor on older 
cars (pre-1990s) or a computer on modern cars, both 
work on similar principles.  
The powerful electric spark is created by an ignition coil, 
essentially a voltage amplifier.  The coil is a transformer 
that takes 12 volt current from the car battery and 
increases it to 10,000+ volts, similar to the way your cell 
phone charger takes 115 volts from the wall outlet and 
turns it into about 3 or 4 volts for your cell phone-just 
the other way around.  
The electricity from the ignition coil now travels to the 
distributor which does what its name suggests, it 
distributes electricity to each of the cylinder spark plugs.  
A distributor is a shaft that spins at the same speed as 
the camshaft (its usually connected by a gear) and at 
one end has an electrode that looks and spins like the 
hand of a clock.  
On the outside of the distributor or its case (which 
doesn't spin) are electrodes, one for each of the 
cylinders spaced evenly around in a circle-like the 
numbers on a clock.  When the hand of the clock passes 
near any of the clock numbers as it is spinning- an 
electric spark jumps between the hand and the number.  
This spark then travels down a wire to the spark plug 
just in time for its big boom.  This happens once for 
each cylinder every time the distributor and camshaft 
spin.  Because the camshaft, crankshaft and distributor 
spin together, the timing of the spark for each cylinder 
can be set precisely to the timing of the combustion 
cycle.  
On modern cars the mechanical distributor has been 
replaced with a computer, but that computer still relies 
on measuring the spin of the crankshaft and camshaft to 
know when to send the spark.  This is accomplished by a 
wheel with a certain number of teeth cut into it (like a 
bicycle gear) which is attached to the front or back of 
the crankshaft.  A sensor counts the teeth as they go 
spin by to know what position the crankshaft is in- and 
when to fire each spark plug.  When its time to fire a 
spark, the computer sends an electrical signal to each 
cylinder’s dedicated ignition coil, to send electricity to its 
spark plug.  This results in greater accuracy and 
adjustability of the spark due to strict computer control.  
Also the is less power loss by sending the spark a 
shorter distance, usually the dedicated coil is near to the 
spark plug.  
In a distributor system, the spark has to travel from the 
coil to the distributor through a long wire to the spark 
plug- losing some of its power along the way.  Also If 
the long spark plug wires come in contact with 
something metal-like the engine itself the spark can 
jump from the wire to the block and miss the spark plug 
altogether.  This is referred to as a misfire, and makes 
the engine run roughly.  As a consequence, the spark 
plug wires must be carefully routed around the engine 
bay to make sure they aren’t touching anything metallic.  
Plastic clips or brackets are often used to guide the 
wires.    
      
      
            
                        
            
            Distributor Ignitions system
      
      Distributorless ignition system