Africa has always been and remains even now a region of small rural settlements, with urban centers of several kinds interspersed among them. Settlement patterns vary regionally, depending on differences in ecology, economy, and routes of communication and on the distribution of natural resources and of trading centers. With the general poverty of production in most parts of Africa, the most efficient pattern of settlement has been that of many small villages, each generally self-sufficient and not dependent on transport or trade, except for specialty items. In most of Africa, short-lasting materials have generally been used for building houses, which, therefore, have only rarely been permanent. The dwellings built of adobe or stone last longer than those of mud and wood, and, in many areas—especially the western African savanna—they have been architecturally quite elaborate. But with a general pattern of shifting farming and pastoralism, coupled with a lack of means for the accumulation of wealth by inheritance, the almost universal pattern of settlements that last for only a few years, certainly for less than a generation, has been highly efficient.
Nonetheless, Africa has also been, and is increasingly, a continent on which urbanism and urbanization have flourished. We may distinguish three main types of urban centers. One is that of the traditional precolonial town, built of long-lasting materials and typically occupied by people who are engaged in craft production and commerce. The greatest of these centers are in northern Africa—in Egypt, Morocco, Algeria, and Tunisia. Others are in western Africa, in particular in both northern and southern Nigeria—cities such as Ibadan and Kano, each of which numbered many thousands in population even before the advent of colonial rule. There are also the ancient towns of Ethiopia and the Sudan and the stone-built trading towns along the eastern African coast that have been on the same sites for many centuries (e.g., Mombasa, in Kenya). Ancient (often ruined) towns also exist elsewhere along the southern Saharan fringes (e.g., the medieval town of Djenné, in Mali) and in other places (e.g., the ruins of the stone fortresses of ancient Zimbabwe). Most of these traditional towns and cities have had ethnically homogeneous populations, ruled by indigenous kings, and their residents' main occupations have beeen both trade and farming, with farmers living in the towns and commuting out to their farms.
A second type of town comprises those built by the colonial powers, usually as new industrial centers associated with extractive industries (gold, diamonds, copper). These towns were often sited in areas of low population density, and they have needed a continuous influx of labor, as was the case in Johannesburg and the towns of the Zambian and Zairean Copperbelt. Other colonial towns, such as Nairobi, in Kenya, were established as communication centers. Most of these modern cities have also become administrative and business centers. They have heterogeneous populations, drawing as they do on immigrants from wide areas, and typically they have a sexual imbalance, given that most immigrants are men whose wives stay behind to farm in the rural areas.
In the third category of town are the many small "townships" that were established during the colonial period as local administrative and trading centers. They remain important everywhere as markets, and they provide links between the rural areas and the more modern cities.
One factor of crucial importance to African urbanization is that of labor migration, especially in the newly established cities that need large numbers of unskilled laborers. Because the African continent is generally impoverished, the cities act as magnet areas, as places where men (and some women) can make the money that is unobtainable in the rural areas. The general process (since around the mid-twentieth century) has been that the cities attract men from the country, who work in them until they grow old and return to their rural homes. Meanwhile, the rural areas have a surplus of women, on whose shoulders fall all the tasks of farming. In some areas, especially in southern Africa, this imbalance has led to serious land crowding, underproduction, and social collapse in the countryside and to a violent and predatory life in the large cities, where the men are never more than temporary sojourners. Furthermore, such cities are the seats of modern elites, attracted by the money and power that are available there, who are skilled enough to benefit from the new opportunities offered by modern industry and commerce. During the twentieth century, a new class structure has been emerging, which closely resembles those found in the countries of the modern industrialized world outside Africa. Within this upper elite are both wealthy merchants and modern political leaders, whose interests are more likely to coincide with those of fellow members of the elite elsewhere than with members of the local communities from which they have come.