This phenomenon occurs when a fertilised ovum or partially formed fetus splits. If the fetus splits completely, the result is two identical twins. However, if the fetus does not split fully, the result can be anything from two whole people joined by a bit of skin (conjoined / Siamese twins), through to one person with extra body parts: the extra parts are the body of the vestigial twin.
Most vestigial limbs are non-functional, and although they may have bones, muscles and nerve endings, they are not under the control of the host. The possession of six or more digits on the hands and feet (polydactyly) usually has a genetic or chromosomal cause, and is not a case of vestigial twinning.