This image (source) ought to tell you all you need to know about how it works. There are wiper contacts on the dial, shown at the bottom, that mate with pads on the meter's PCB.
These pads are connected to different taps of a voltage divider to divide the voltage, or to pass current through a current shunt.
Internally, the meter can only measure voltages from, say, -0.2V to +0.2V. The range switch changes the voltage divider to prescale the input voltage to be within that range, and on most meters will also send a signal to the LCD to tell it where to put the decimal point.