Darwin would say giraffes had long necks because the trait of a longer neck helped them better adapt to their environment, could reach higher for food sources than other animals. Also at that time, geologists figured out that the Earth and life were old enough for the natural selection to work gradually over time. Malthus pointed out that human populations would increase beyond the capacity of the available resources if it weren t for wars, famine and diseases limiting the population. Natural selection is the mechanism of evolution. In a struggle for life, variations that help the organism survive are most likely to be passed on to offspring.
Adaptation is evolutionary change that improves the chances of survival and reproductive success.
Better adapted variations would become more numerous in population, less adapted organisms would die out. Wallace, another biologist independently came up with natural selection to explain how things adapted to their environments. He and Darwin presented their ideas together, but Darwin wrote the book, Origin of Species. Natural selection depends on Overproduction - not all offspring mature and reproduce, some will die off. Variation - some traits increase reproductive success, others decrease.