A simple but less efficient methode of controlling a DC voltage is to use a voltage divider and transistor emitter follower configuration. The figure below illustrates using a 1K pot to set the base voltage of a medium power NPN transistor. The collector of the NPN feeds the base of a larger PNP power transistor which supplies most of the current to the load. The output voltage will be about 0.7 volts below the voltage of the wiper of the 1K pot so the output can be adjusted from 0 to the full supply voltage minus 0.7 volts. Using two transistors provides a current gain of around 1000 or more so that only a couple milliamps of current is drawn from the voltage divider to supply a couple amps of current at the output. Note that this circuit is much less efficient than the 555 timer dimmer circuit using a variabe duty cycle switching approach. In the figure below, the 25 watt/ 12 volt lamp draws about 2 amps at 12 volts and 1 amp at 3 volts so that the power lost when the lamp is dim is around (12-3 volts * 1 amp) = 9 watts. A fairly large heat sink is required to prevent the PNP power transistor from overheating. The power consumed by the lamp will be only (3 volts * 1 amp) = 3 watts which gives us an efficiency factor of only 25% when the lamp is dimmed. The advantage of the circuit is simplicity, and also that it doesn't generate any RF interference as a switching regulator does. The circuit can be used as a voltage regulator if the input voltage remains constant, but it will not compensate for changes at the input as the LM317 does.
circuit from http://www.bowdenshobbycircuits.info/page12.htm#dimmer2.gif