The regulator acts as a control mechanism by varying the amount of current in the rotor, called the field current, and thus controlling the output voltage of the stator. Simple alternators were originally electromechanical devices that switched the field current on and off to control the output voltage of the alternator.
Today's alternator regulators are all semiconductor based, and the more sophisticated ones are controlled by an embedded computer chip. Many regulators are built in to the alternator, but this doesnt permit any adjustments, so the more sophisticated alternator regulators are all externally mounted. Computerized alternator regulators read inputs such as battery voltage, battery and alternator temperature, and time, and relate them to the programmed requirements of battery type and other parameters. They aim to produce a three stage charge that optimizes alternator output and fully charges batteries. Many have digital readouts to facilitate programming and give a readout of progress.
Below is a video showing a Balmar ARS5 regulator in action: