A magnet is attached to the engine’s crankshaft to time the voltage spikes, these spikes are fed directly into the spark plugs to cause ignition, this is why you don’t need a battery.