You're asking about the dreaded 'white wire'. There is page after page of discussion on that subject. Just type in 'white wire' in the search feature.
Many of us won't have anything to do with it. I snip mine off of every new engine and never look back.
The magneto is supposed to produce a 6 volt current to the white wire but that voltage varies with engine rpm. I've seen as low as 4 volt and as high as 10. The problem is that it is very low wattage. Using any incandescant lamp over about 2.5 to 3 watt will result in the magneto being unable to produce sufficient voltage to the ignition circuit.
There has been some experimentation with LEDs which have a lower wattage requirement but even then the amount of light available is not enough for real world night riding. I prefer to carry a small SLA (sealed lead acid) 12 volt battery to power my lighting and recharge after an evening ride.
Again, try the search feature and sit back because you're going to find plenty to read about the "white wire"