Very hot is not good and as
@André4Renaults wrote it could indeed be a short somewhere.
Normally the coil get warm under normal operation as it "shorts" aprox. 40-50 times per second.
Here's the theory of operation or as I call it elementary school electronics.
The battery voltage is much too low for a spark plug to spark. The battery voltage is therefore increased to a value of 10,000-30,000 volts using the coil, which is nothing more than a transformer.
The breaker is opened and closed by a polygonal shaft (in a four-cylinder engine this is square) with rounded corners, the distributor shaft. This is usually driven by the engine's camshaft and therefore rotates synchronously with it, at half the speed of the crankshaft. In the rest position, the stop of the breaker rests against a flat side of the distributor shaft and the circuit from the positive pole of the battery is closed by the primary winding of the coil to the negative pole (which is on the chassis). A magnetic field builds up in the coil through induction.
Ignition takes place at the moment that the breaker opens because one of the corners of the distributor shaft reaches the stop and as a result the arm of the breaker lifts (the contact points are opened). At that moment the magnetic field disappears and that causes a very fast (steep) induction current surge with high voltage that discharges over the spark plug. Between the electrodes of the spark plug this high voltage bridges a small distance through the air and that gives the ignition spark.
The capacitor plays an important role in this. Its task is threefold.
1. it absorbs the induction current surge so that no spark occurs between the contact points of the breaker. Without a capacitor the contact points would burn in very quickly.
2. the capacitor together with the self-induction of the coil (they form a so-called LC circuit) ensures an alternating current in the coil that can therefore function as a transformer: a direct current cannot be transformed.
3. the capacitor ensures the highest possible induction voltage. Charging the capacitor at the moment the contact points are opened happens so quickly (the increase is so steep) that the magnetic field of the coil collapses much faster (approx. twenty times faster) than would be the case without a capacitor. In simple terms: the power stored in the coil does not simply flow to the ground, but the coil is, as it were, sucked empty by the capacitor. This creates a much higher voltage peak on the secondary side of the coil, which ensures that a very bright spark is generated between the electrodes of the spark plug.
The high voltage is led to the center connection of the distributor with a spark plug cable, and the rotor mounted on the distributor shaft (and therefore running synchronously) ensures that the high voltage is led to the correct spark plug.