An ignition coil generates high-voltage electricity to create a spark that ignites the fuel-air mixture in the engine.