It does both.
The reason for a voltage spike if you switch off power to an inductor of some sort, without a flywheel diode or other protection, is that the current will continue flowing for some time - or at least try to. That can cause an extremely high voltage to build up for a fraction of a second.
The diode means the field current can keep circulating for some time. Probably only a fraction of a second with this, but I've seen big industrial motor or generator fields where you can see the current drop down over five seconds or more.
It means with this that the dynamo output voltage or current should not be fluctuating wildly as the transistor switches on and off, but more ramping up and down fractionally either side of the set voltage.