A magneto is essentially an electric generator but it’s not used to power the aircraft’s electrical system. Its purpose is to create pulses of high voltage current to create a spark across the spark plug gap used to ignite the fuel-air mixture. It acts independently from the aircraft’s electrical system. Because it requires no battery or other source of electrical energy, the magneto is a compact and reliable self-contained ignition system, which is why it remains in use in many general aviation applications.