How it works
A potentiometer (often called a "pot") is a three-terminal variable resistor. It contains a resistive track and a conductive wiper that slides along the track when you turn the knob. The resistance between the two outer terminals is fixed, but the resistance between the middle wiper and the outer terminals changes as the wiper moves.
When all three terminals are used, it acts as a variable voltage divider, perfect for volume controls or setting reference voltages. If you only connect the wiper and one outer terminal, it acts as a simple variable resistor (rheostat) to control current.