The function of the terminals are...
B+ the positive output terminal, goes to Battery
B- the negative output terminal, goes to the negative bus or engine
block as applicable
W connected internally to one stator winding before the diode pack and provides an AC output of about 7VAC. This can be used to pulse (drive) a tachometer as the frequency of the AC is proportional to the speed of rotor thus proportional to the engine speed. W stands for 'waveform'.
D+ goes to the warning light. Stands for ‘Dynamo Positive’ on old style generators (AKA dynamo). It is through this terminal that the alternator is initially externally excited. Before an output is established, the current
flow through the rotor winding is from the battery +ve, via the key switch (ignition switch), through the warning light, to the D+ terminal and then through the rotor winding via the brushes
and finally to B- (ground). At this point the warning light has current
flowing through and thus is illuminated. However once an output is established, the output voltage is supplied (internally) by the regulator
to the D+ terminal. This causes the the current to cease flowing through the warning light and so it is extinguished. The alternator is now self exciting i.e. it provides it's own rotor voltage/current internally.