Quantum tunneling is when quantum particles (electrons, quarks, neutrinos, etc.) spontaneously jump across an insulating barrier, presumably instantaneously, regardless of the distance being crossed. It doesn't violate the speed-of-light law because the probability of each particle tunneling through the barrier decreases as the barrier size increases, so when you zoom-out far enough that you get back into the realm of predictable physics, the average time it takes for an entire "batch" of particles to tunnel through the barrier is equal to the time it would take them to travel that distance at the speed of light if they all went at once instead of hanging out and waiting to jump.
So I'm guessing the switch has some sort of an insulator that can vary in thickness as the switch is compressed, and electrons jump across in varying amounts as quantum physics allows.