Lay a plastic tarp where you're fixing the leg to protect the floor from glue stains and sanding material.
Measure the length of the leg before you replace the broken leg with a new one. Replacement legs may be off in measurements, so sand down the replacement leg (or possibly sand down the other three legs) to make sure all legs are even.
Remove the broken leg and drill at least a 3-inch hole (long enough for the dowel to fit comfortably inside the leg) into both ends of the chair.
Coat a moderate layer of glue onto the dowel and place it into the leg’s drilled holes. Firmly push the dowel into place and hold for a few seconds so that the glue can set. Make sure that dowel is in as far as possible and that the chair leg is even with the others.
Put the new leg back into place in the chair. Firmly secure the legs into place with large rubber bands or clamp bars. Allow the chair leg to dry overnight.
Remove the rubberband or clamp after the glue dries, and test the chair.