The potentiometer is not a normal resistor. They are often used simply as variable resistors, but in this example its use does its name justice -- "potentiometer" = voltage measure. The float is attached to a type of slider which contacts the resistor at some point in the middle. The result is that you can treat the potentiometer as two resistors (I'll call them R1 on top and R2 on bottom) in series, where R1 and R2 always add up to the same total resistance, and therefore where the potential drop across R1 and R2 always add up to the voltage of the source on the left.
As an example, if the float is at the top, you might find that R1 = 0 and R2 = 1000 Ohms. If the voltage source is 5V, then V1 (the voltage drop across R1) = 0 and V2 = 5V. If the float is exactly in the middle, R1 = R2 = 500 Ohms. Then V1 = V2 = 2.5V. If the float is at the bottom, then R1 would be 1000 Ohms and R2 would be 0, V1 would be 5V and V2 would be 0.
The movement doesn't change the voltage across the one whole resistor, but it changes how much of that voltage drop is above and how much is below the float. As drawn in your diagram, the voltmeter/level indicator measures V2, the voltage drop that is below the float.