3 leg potentiometer - what's the 3rd leg for?
Using the third leg turns the rheostat into a potentiometer. The whole thing acts as a voltage divider, with the moving wiper varying the ratio between the two resistances connected to the differing voltages.