Both.
When the temperature knob is turned, it adjusts the flow rate such that either more water flows past the element (cooler shower), or the opposite.
However most of these showers also have a second knob, often with 4 positions at quarter turns, including one 'cold' position. This knob adjusts the power going to the element.