Basically, the way it works is that one end of the bulb is tied to the 12V bus and the other end is tied to the alternator. When the alternator is not working, the current flows from the 12V bus to the alternator, and so the bulb glows. That's why an alternator light makes for a good warning light if you leave your master switch on.
Once the alternator is working properly, current can no longer flow from the bus to through the light, as there is 12V at both ends. Hence, the light goes out.
It's best to use a simple incandescent bulb but you can make an LED work.
Vic