There are lots of analog devices that people are using to build their Arduino projects. One of the most common component is the potentiometer. There are lots of different types potentiometer in the market but all of them serve the same purpose, an adjustable resistor or an adjustable voltage divider.
The schematics diagram below explains how the potentiometer works as the voltage divider, the voltage value changes when adjust the potentiometer.
You can imagine the pencil lead as a potentiometer, a battery cell are hookup on both ends of the pencil lead and you use and voltmeter to measure the voltage value at any point between the both ends of the pencil lead.
If your want to learn more about basic electronics, you can consider this mini course.