chair legs are usually made on a lathe. otherwise, need a saw, a drill with the right size drill bit, a hand planer, some type of sander, some wood glue and some clamps, along with measuring tape and marker. of course you’ll also need to use safety glasses, and maybe some hearing protection and work gloves, too.
consider carefully removing other back leg (that’s still currently on the chair) and using it to plan making a copy for the other leg. don’t know if you can actually find someone who sells a variety of legs for chairs, but you’ll need to get a piece of wood close to the same diameter of, and a little longer than your other chair leg. since it’s painted, the type of wood isn’t so critical. Oak is stronger than pine, but harder to work with and more expensive.
clamp the wood to a table top and drill the right size hole, the right depth, at the right location along the length of the wood, and at the correct angle. use the hand planer to shape the leg to match the profile of the others, adjusting the piece and resetting the clamp as required. use the sander to make the new leg relatively smooth. copy the angle at the top of the other leg and mark a line to cut that angle on your new leg, and use the saw to cut the end of the leg off at the right angle. then mark the other end to the right length and cut it off.
apply some wood glue to the end of the legs that go into the bottom of the chair seat, and in the holes where the lower rails fit into the legs, place the legs in position at the seat and fit the rails into place and allow the glue to set.
this is much easier to explain than is is to actually do. if you’re not experienced or fitted to do woodwork, you may want to just take the chair to someone who does woodwork, and they might help you out.