Both of these circuits are taking advantage of the fact that there will be a fairly constant drop of 700 mV from the base to the emitter of a transistor when the transistor is on.
In the constant current circuit, the two diodes will raise the base of the transistor up to ~1.4V. 700 mV is then dropped from the base to the emitter. This means that 700 mV is left and that is being dropped across the 700 Ohm resistor. This means 1 mA of current is then flowing through that resistor. The current through the collector (which the potentiometer is connected to) will be virtually the same as what flows through the emitter. (The base current is neglected since is is typically much smaller in comparison.) The 5.6k resistor is just to limit current through the diodes and base/emitter junction.
The voltage regulator circuit is relying on the same property. So the battery or voltage reference forces the base to 5.7V. 700 mV is then dropped between the base and emitter. This makes the output fixed at a constant 5V.