There have been many theories explaining evolution. Two of the most well known of these are the Lamarckian theory, which was mostly believed before the Darwinian theory, which is the theory which is believed to have the highest probability of it being the case.
Darwin's theory relied on a process of natural selection. In his theory, at the start there would have been many giraffes of varying heights, which would be so due to the variations in organisms through the process of sexual reproduction. Darwin stated that all life competes in a struggle to exist. Therefore, during a dry season when there is not as much nutrition available on lower levels for the shorter giraffes, the giraffe's that are more likely to survive are the ones with the longer necks and legs. The giraffes with the shorter necks and legs would die, disabling them to pass on their genes for the shorter legs and necks, resulting in a new generation of longer necked and legged giraffes.
These theories can also be shown using other animals such as the horse. The ancestors of horse were once much smaller than the modern day horse. They had four toes on the front legs and three on the back. These toes were padded so they allowed the horse to easily move through wet ground. As the horse moved out of the forest and swamp areas to the plains its head, neck and legs became longer, allowing faster movement and it adjusted to standing on only one toe.
Darwin's theory would of course differ to this, saying that the horses that survived were the ones, which were able to run faster. These would have been the horses with the longer legs, and so the genes for the horses with the longer legs would be passed on to the next generations.
These theories have been widely believed to be the explanation for the varying species of animals on the earth. It is well known now that the