There isn't really a "switch" in the alternator. One side of the dash light goes to 12 volts via the ignition switch. The other end goes through the D+ terminal on the alternator and connects through the "exciter" coil and then to ground on the other end of the coil windings. Since it is grounded through that winding, it lights when the key is on and the alternator not moving.
Here's where the electrical "magic" happens.
Once the alternator starts spinning, it begins to generate voltage within both the primary windings (another coil that charges the battery) and the exciter windings. When the exciter windings generate as much or more voltage level than the battery's voltage, it magnetically isolates the dash light circuit from ground and essentially cancels the lamp out since it now has 12+ volts on both sides of the lamp. 12 volts coming from the ignition and 12+ volts coming from the exciter windings. No ground, no light.
As the alternator slows down and the exciter winding voltage drops because the magnetic field becomes weak, eventually it goes below the level of the battery voltage and allows that dash lamp to magnetically "see" ground through the exciter winding. It's a progressive thing, like a dimmer switch. The slower it turns the weaker the magnetic field and the more "ground" it sees and the brighter the dash lamp gets.
Hope this helps. It almost seems like there's some black magic going on, but it's all magnetic fields, like a motor in reverse.