The developed world is getting old, and Japan is the poster boy.
The graph below shows how, over the course of a century, Japan shifts a from nation where children predominate to a nation of senior citizens. (The population figures and projections for the coming half-century are from the United Nations' Population Division.)
Aging populations are typically driven by declining fertility rates and increased life spans.
The U.S. is aging as well, but not nearly as much as Japan. The fertility rate in the U.S. remains higher than the fertility rate in Japan — 2 children per woman in the U.S. vs 1.3 in Japan.
*Not all countries are getting older. Many developing countries still have high fertility rates, and children account for a huge share of the people in those countries. (Typically, fertility rates don't start falling until countries hit a certain stage of economic development.)
In Nigeria, for example, the fertility rate is 6 children per woman. Note that the graph shows only percentages; what you don't see is that Nigeria's population is skyrocketing.
Population Growth, 1950-2050
When you look at the whole world, you see a blend of these two trends — the population of the globe is aging, on average, but there are still far more children than old people.