Potentiometer vs. Transistor
A potentiometer varies a voltage, rather than a current. You presumably mean a rheostat, a BJT is a current-operated device. The word transistor was coined from "transfer resistor".

Transistor operation is a bit more complex than simply varying the setting of a rheostat. The Art of Electronics uses this cartoon with a "Transistor man" to explain how a transistor works: