Understanding potentiometers

Im moving into the potentiometer example and Im trying to understand this:

"When the resistance between the center and the side connected to 5 volts is close to zero (and the resistance on the other side is close to 10 kilohms), the voltage at the center pin nears 5 volts. When the resistances are reversed, the voltage at the center pin nears 0 volts, or ground. This voltage is the analog voltage that you're reading as an input."

The pot gets 5v on one side and 0v on the other side. The difference is read by the middle pin. But what exactly makes the resistance increase?

Ok i found a picture on google of the inside. So what makes it work is the fact that it has a metallic strip. What creates the increase in resistance is how close the pin is to the 5v side. If it is closer then the resistance is less because there is less material (metallic strip) between the 5v side and the middle pin. If it is farther away then there is more resistance because there is more material in between.

The metallic track doesn't get wider or change composition, right?

Yes, think of the track as a series of very small resistance values.
If used as a voltage divider, the attached picture shows how the wiper voltage changes as you move along the track.

The track is carbon or cermet, not metal, or it would be 0.01 ohms!

In a linear potentiometer (commonly used for anything except audio volume, and what you're using), the track doesn't get wider or narrower, nor change composition. If it did, the resistance would not change linearly as you adjusted it.

There also exist log scale pots where the voltage goes up logarithmically, rather than linearly - in these cases, the width of the track is not constant. These are used for audio volume adjustment, since perceived volume is logarithmic.