As an anatomical animal structure it is used for locomotion. The distal end is often modified to distribute force (such as a foot). Most animals have an even number of legs.
As a component of furniture it is used for the economy of materials needed to provide the support for the useful surface, the table top or chair seat.
Uniped: 1 leg, such as clams
Biped: 2 legs, such as humans and birds
Triped: 3 legs, which does not occur naturally in healthy animals
Quadruped: 4 legs, such as dogs and horses
Many taxa are characterized by the number of legs:
Tetrapods have four legs.
Arthropoda: 4, 6 (Insecta), 8, 12, or 14 legs. Some arthropods have more than a dozen legs; a few species possess over 100. Despite what their names might suggest, centipedes ("hundred feet") may have fewer than 20 or more than 300 legs, and millipedes ("thousand feet") have fewer than 1,000 legs, but up to 750.
A leg is a structure of gross anatomy, meaning that it is large enough to be seen unaided. The components depend on the animal. In humans and other mammals, a leg includes the bones, muscles, tendons, ligaments, blood vessels, nerves, and skin. In insects, the leg includes most of these things, except that insects have an exoskeleton that replaces the function of both the bones and the skin.
Sometimes the end of the leg, or foot, is considered part of the leg; other times it is considered separate. Similarly, the hip joint or other place where the leg attaches to the main body may be considered separate or part of the leg.
In tetrapod anatomy, leg is used to refer to the entire limb. In human medicine the precise definition refers only to the segment between the knee and the ankle. This lower segment is also called the shank, and the front (anterior) of the segment is called the shin or pretibia.
In bipedal tetrapods, the two lower limbs are referred to as the "legs" and the two upper limbs as "arms" or "wings" as the case may be.
A robotic leg is moved by an actuator, which is a type of motor for moving or controlling a mechanism or system. It is operated by a source of energy, usually in the form of an electric current, hydraulic fluid pressure or pneumatic pressure, and converts that energy into some kind of motion.