On my guitar I have two humbucker pickups.
The one closer to the bridge is the 'lead' pickup.
The one closer to the neck is the 'rhythm' pickup.
The switch is three positions: down is the lead pickup, middle is both, up is the rhythm pickup.
My guitar also has four knobs. Two pairs of tone and volume for each pickup. You can 'test' how the pickup/tone switch works by selecting - for example - only the rhythm pickup then turning to rhythm volume all the way down to hear that no sound comes out. You can try the various combinations to confirm how the switch is actually engaging/disengaging the pickups.
The lead pickup has a more treble tone, because it's picking up vibrations closer to the bridge which have a treble tone. The rhythm pickup being farther away from the bridge has a less treble tone. So changing the switch and the pickup(s) engaged changes the tone.
You can also demonstrate the tone effect relative to the bridge by picking a string closer or farther from the bridge and noticing how the sound becomes more treble as you get closer to the bridge.
The typical use is 'lead' position for lead guitar, because the treble tone helps it be heard more clearly. But this is pretty subjective. The 'rhythm' position has a nice warm tone that sounds good for playing jazz leads.