A dimmer is an easy upgrade that adds ambiance and saves a little energy. The main gotcha today is compatibility: not every dimmer works with every LED bulb.
Choose a compatible dimmer
Most bulbs are now LED, and you need a dimmer rated for LEDs (and ideally listed as compatible with your bulbs) to avoid flicker and buzzing. Check whether your switch is a single-pole (one switch) or three-way (two switches control one light) — they wire differently.
Power off and wire
Turn off the breaker and verify the wires are dead. Dimmers usually have stranded leads that connect to the house wires with connectors — line, load, and ground for single-pole, plus travelers for three-way. Follow the dimmer's diagram for your configuration.
Mount and test
Tuck the wires in, screw the dimmer to the box, add the faceplate, and restore power. Test across the dimming range for flicker. If LEDs flicker, a different compatible dimmer usually solves it.