Turn the chair upside down and lay across two sawhorses. Using a screw gun, unscrew all the braces that hold the legs to the frame. The braces could be either metal or wood. There will be one large screw penetrating the leg through the brace in the center, and two smaller screws penetrating the brace into the frame of the chair.
Grab the legs. If they are already loose, pull them out of the frame. If they seem stuck, tap on the legs sideways with a hammer to free them and then remove them.
Scrape off any residual glue or debris with a chisel from the area where the legs attach to the frame. If there are any small brads or nails, use diagonal pliers to pull them out. Scrape the frame clean and smooth where the legs touch.
Apply a small amount of glue to the area where the leg touches the frame. Stand the leg in place against the corner of the frame where the old one came off. Fit the brace over the leg where it came off of the frame. Using the screw gun, screw the sides of the brace to the frame using the same screws that came out of the brace. You should see glue oozing out from behind the leg.
Screw the large screw through the center of the brace into the leg. Push hard to compress the brace against the leg. Do all four sides.