In a savannah, there are average necked girraffos surviving on mostly average height trees. Over time, they got separated due to a mountain forming in the middle of the savannah. One part consists of very long trees(150ft tall), and the other had the same average height trees(30ft tall). The girrafos that lived on the side of taller trees had to adapt to their new habitat.
One giraffo has received a long neck variation, which arises from mutations. Then it passes it on to the girraffos in that side of the habitat. Since they are now living on the other side of the savannah where it consists of longer trees, the long neck has evolved to eat from the long trees.There is selection in the way that giraffes with longer necks are better able to survive in the new adaptation, because they eat the leaves from the tall trees.
The giraffes will continue to pass on the gene of longer necks to its offspring. Over time, there would be more giraffes with very long necks, because giraffes with smaller necks wouldn’t be able to survive in that habitat.
The original population, that consists of average sized necked giraffos differred to the new populations that consists of long necked giraffes. They both live in the savannah, but the new population lives in an area with long trees unlike the original populations where it lives in an area with average sized trees.