A magneto is an electrical generator that uses permanent magnets to produce periodic pulses of alternating current. Unlike a dynamo, a magneto does not contain a commutator to produce direct current.
A magneto provides current for the ignition system of the engine. It produces pulses of high voltage for the spark plugs.
It is used in aviation piston engines even though an electrical supply is usually available. In this case the magneto’s self-powered operation is considered to offer increased reliability; in theory the magneto should continue operation as long as the engine is turning.