In an automobile, the battery supplies the primary current; in a magneto, the magnet on the flywheel moving past the core at high speed acts as a generator and induces current in the primary.
As the magnets spin past the pole pieces of the magneto core, the points are closed and current builds up in the low voltage winding (and flux builds up in the core). At or slightly before Top Dead Center (TDC), the current (and flux) should be maximum and at this instant the points open. The flux then collapses (and the condenser (capacitor) across the points acts as a snubber allowing the current to bypass the open points and preventing arcing at the point contacts). This rapid decrease in flux results in coupling of the stored energy to the turn high voltage winding and results in up to 10,000 V or more at the spark plug.
(For EE types, this is somewhat similar in basic operation to the flyback converter in a switchmode power supply except that the moving magnet supplies the input power instead of the rectified AC line and the points act as the switch instead of a power transistor.)
The secondary will always be accessible for testing but the primary of an electronic ignition may be not be due to the electronic components:
Wires can break due to corrosion or vibration. This would result in an open winding - infinite resistance. Shorts can develop between adjacent windings or to the core. This may be detectable as reduced resistance but without knowing exactly what it should be, there is no way of knowing if a slight discrepancy represents a problem or just slight variations in design or manufacturing.
A more complete test would involve checking the 'Q' or doing what is called a 'ring' test and even more for an electronic ignition. This requires special equipment. Therefore, it is best to swap in a known good unit. They are not that expensive.