Ignition coils fail due to bad spark plugs or plug wires. Another potential cause is heat and vibration, which can damage the ignition coil's windings and insulation. If an engine is experiencing repeated coil failures, the underlying cause may be resistance from worn spark plugs or excessive spark plug gap. And in rare cases, the failure may be due to a lean fuel condition caused by leaky valves.
With coil on plug (COP) type coils, the rubber insulation dries up (over time and heat from the engine) and cracks and will arc across the engine's metal- shorting out. (Electricity seeks the path of least resistance)
By design, coils take low voltage energy from the battery (12-Volts dc) and transform that energy into a very high voltage charge (in the range of 30,000 to 35,000 volts) to energize the spark plugs which in turn ignites the fuel.
If a spark plug or plug wire is open or has excessive resistance, the ignition coil's output voltage can shoot higher (above the max threshold of 35,000 volts) and burns through the coil's internal insulation, causing a short.
When a coil failure occurs, the coil's voltage output drops, and the engine may not start or may misfire badly when under load.
Extreme caution should be exercised when handling coil packs that are energized- a lethal dose of voltage can arc across the air into the body.
So don't touch them when the engine is running!
As stated earlier, if you need to replace the COP, replace the spark plug too, make sure the spark plug is properly gapped.
You can read more about coils here:
Ignition Coil High Voltage Display