If we are talking about the legs with a "wheel", then it is necessary at the expense of the muscle to draw in the legs as if "scrolling" them, trying to connect the knees. Quite a difficult exercise if the knees are far from each other, but if you wish and constant control, you can get closer to even and beautiful legs.
It all depends on the degree of curvature of the legs and its nature. It is important to understand whether the congenital problem or the legs became crooked afterwards, clubfoot, etc.
There are many exercises on the Internet that can help with "artificial" curvature of the legs afterwards, in the case of a congenital defect, the effect of exercise will be barely noticeable. It is better, of course, to contact an orthopedist, he will be able to give quality advice.