The answer to 'how does dimmer switch work' is that a dimmer switch controls the amount of electricity flowing to a light fixture, allowing you to adjust the brightness of the bulb. Dimmer switches work by using a variable resistor to reduce the voltage supplied to the light, which in turn reduces the amount of power and brightness. This is done by using a sliding lever or rotating knob on the dimmer switch to control the resistance.
Dimmer switches are commonly used to create different lighting levels in a room, from bright overhead lighting to a soft, ambient glow. They are often used with incandescent and halogen bulbs, but can also be used with dimmable LED and CFL bulbs. When installing a dimmer switch, it's important to ensure the bulbs are compatible and rated for dimming to avoid any issues.