That's right; when they open.
It works like this: when the points are closed, the current in the primary of the coil reaches a more or less constant DC value. When the points open, the collapse of the magnetic field around the coil generates a large voltage across the coil. If there were no capacitor, you would just get a huge "spike" of voltage, which would probably arc across the points, frying them, and be too short to light up the plugs very well. But, with the capacitor, you get an AC current in the coil, which dies out over a much longer period of time. The peak voltage across the coil is also much lower--but still a couple hundred volts, if I remember correctly. (So, keep your fingers off those "low voltage" terminals; they ain't just 12 volts!) I've measured this on my bugeye; the AC is about 10 KHz and lasts about 0.8 millisecond before the spark extinguishes.