The ignition system on your car has to work in perfect concert with the rest of the
engine. The goal is to ignite the fuel at exactly the right time so that the expanding gases can do the maximum amount of work. If the ignition system fires at the wrong time, power will fall and gas consumption and emissions can increase.
When the fuel/air mixture in the cylinder burns, the temperature rises and the
fuel is converted to exhaust gas. This transformation causes the pressure in the cylinder to increase dramatically and forces the piston down.
In order to get the most torque and power from the engine, the goal is to maximize the pressure in the cylinder during the power stroke. Maximizing pressure will also produce the best
engine efficiency, which translates directly into better mileage.
There is a small delay from the time of the spark to the time when the fuel/air mixture is burning and the pressure in the cylinder reaches its maximum. If the spark occurs right when the piston reaches the top of the compression stroke, the piston will have already moved down part of the way into its power stroke before the gases in the cylinder have reached their highest pressures.
To make the best use of the fuel, the spark should occur before the piston reaches the top of the compression stroke, so by the time the piston starts down into its power stroke the pressures are high enough to start producing useful work.
The spark plug is quite simple in theory: It forces electricity to arc across a gap, just like a bolt of lightning. The electricity must be at a very high voltage in order to travel across the gap and create a good spark. Voltage at the spark plug can be anywhere from 40,000 to 100,000 volts.
The spark plug must have an insulated passageway for this high voltage to travel down to the electrode, where it can jump the gap and from there, be conducted into the engine block and grounded. The plug also has to withstand the extreme heat and pressure inside the cylinder and must be designed so that deposits from fuel additives do not build up on the plug.
Spark plugs use a ceramic insert to isolate the high voltage at the electrode, ensuring that the spark happens at the tip of the electrode and not anywhere else on the plug; this insert does double-duty by helping to burn off deposits. Ceramic is a fairly poor heat conductor, so the material gets quite hot during operation. This heat helps to burn off deposits from the electrode.
Some cars require a hot plug. This type of plug is designed with a ceramic insert that has a smaller contact area with the metal part of the plug. This reduces the heat transfer from the ceramic, making it run hotter and thus burn away more deposits. Cold plugs are designed with more contact area, so they run cooler.