We must be talking about an ordinary brush armature machine with a parallel field which is excited via a regulator from the supply. Anything else complicates matters, but 99% of two brush traditional dynamos will be of this simple configuration.
Putting the battery across the field gives the strongest excitation we have available, and as a motor it will run at the speed where the back (self generated) armature voltage comes up to match the battery voltage (at which speed it limits itself). Simplistically, driving it as a generator, this is the cut in speed, below which it does nothing useful.
In practice, this might be set at or below tickover, so as an example for an engine with a useable speed range from perhaps 700rpm up to 5000rpm, we might choose gearing so that 300rpm would drive it this speed. I am sure others can provide better experience, but that is the principle.
The polarity is simply decided by the direction of the residual magnetism in the iron of the field. In practice, this will not change from start-up to start-up. Indeed, a piece of mediocre “part steel” iron is ideal, cheap and in no danger of loosing the residual magnetism. You can swap the polarity as often as you like by simply by applying the desired polarity to the field for a second or two.