During the Stone and Iron Ages, hunter-gatherer societies in Africa began to practice pastoralism, which involved raising and herding animals. This shift was influenced by factors such as climate changes, the development of agriculture, and the domestication of animals like cattle and sheep.