Lameness can be caused by a number of different things. Sprains, infections caused by cuts or splinters in the foot, dislocation of the hip, muscle damage, pinched nerves and dietary deficiencies.
Staphylococcus Bacteria cause a condition commonly called Bumblefoot that can cause a swollen abscess on the underside of the foot. Less common are hereditary problems. Fast growing meat chickens suffer from leg problems due to their large size / weight and rate of growth.
Tenosynovitis or tendon inflamation can be more common and painful for older birds. Kidney disease causes lameness or loss of the legs because the nerve that goes to their legs passes through the kidneys.
In old birds, lameness can be caused by arthritis. Mycoplasma synoviae (see tab below) which can cause the hocks to become infected causes lameness and Marek's disease can cause birds to lose their legs.
Waterfowl can go lame or off their legs when they have worms. If an adult duck goes lame, the first thing to check is that they have been wormed recently. Waterfowl can also go lame due to a dietary deficiency of niacin, biotin / Vitamin B which is uncommon if feed is fresh / in date but a more common problem is if there is an imbalance of calcium to phosphorus in the diet.
Layers feeds contain a lot of calcium that is needed by (you've guessed it!) laying birds to form egg shells. Ensure young / growing waterfowl (over 5 weeks) are fed the correct diet of waterfowl growers pellets and not layers pellets. Waterfowl should also have access to wheat fed under water. A bowl or shallow bucket is ideal for ducks and a normal bucket for geese. This also encourages them to dip their heads under water to keep their eyes clean. Non laying adults should always have access to wheat ad-lib. Layers pellets should be offered but for drakes / non layers wheat will make up most of the diet. Waterfowl should have easy access to water and not have to struggle to get in and out of troughs. If you do use troughs, think about burying them half way into the ground to help them with access and provide a ramp on one side and a ramp to get out again.
Waterfowl are on the floor of their house at night and if the bedding is dirty and wet, it can cause cracks and abrasions to the bottom of the feet that can become sore or infected.
Ducklings go off their legs if chick crumbs or growers pellets are fed to them that contain anti-coccidiostats (ACS), a drug designed to prevent coccidiosis in young chickens. Ducklings eat more than chicks and will effectively be having an overdose of the drug.
Symptoms: Can be a sudden or gradual limp. Sprains usually cause swelling as can infection. Dietary deficiency usually causes trembling legs that suddenly give way whilst standing or after a short run. Also legs can be bent or twisted at the hock joint. Leg(s) can feel hot and look swollen with Mycoplasma synoviae or Staphylococcus.
Treatment: Examine the legs and feet for signs of injury - cuts, grazes or bruises. Check the bottom of the foot for any sign of abscess (called Bumblefoot). This is usually caused by a cut on the bottom of the foot. Never catch or pick birds up by the legs, it is very easy to dislocate the leg.
In birds that are otherwise healthy, they can be kept in confinement but ideally where they can see the other birds so they are not stressed. Keep birds in a small clean pen or cage (A large dog crate is useful for this) in a quiet environment where they will not be startled. Feed them the correct diet and ensure they can reach it easily. Fresh water is essential, a vitamin drink can be added to this.
For waterfowl, if possible, provide a small clean pen, again with feed and water in easy reach but also clean swimming water with easy access - this can really help the legs to recover. A small tub buried in the ground with a ramp to get out can work well.
If dietary difficiency is the problem, use a vitamin supplement in the feed / water immediately. Feed ducklings growers pellets (Smallholder feeds in the UK make waterfowl pellets), not layers pellets. The phosphorus:calcium ratio should be in the range of 1:1 to 1.0:1.5.
Joint conditions can be serious and even fatal so if it is not an obvious or superficial problem, don't hesitate to go to your vet.