This is not just a corona related question, this is true for each disease which is can be transmitted easily and which builds up a lasting immunity.
Herd immunity per se means that a large proportion of a given population is immune to a given disease, either because of vaccination or because the population went through the disease, survived it and built up lasting immunity. This means that even when this disease comes around again, it will only infect few people who have no immunity, but will not spread through the population. This can be seen in the figure below (from here), which implies vaccination, but works as well with getting the disease.

The first case is what happens right now with SARS-CoV-2, it is a new disease to which no one has immunity, so everybody who gets in contact will get the disease (either more or less severe).
If no vaccine would be available, this infection would go on, until a big enough proportion of the population has gone through the infection, developed immunity and thus stops the spread (go to the third part of the figure). At this point a big pandemie would stop.
However, this strategy has one problem: People who are coming into the population (newborns for example) who have no immunity are susceptible for the disease. This ensures low level infection rates and will make sure that the disease will stay in the population, but mostly not noticable. Over time the number of not immune people will rise until there are enough of them to feed another big breakout.
As @bryankrause pointed out, in the past getting to the point to reach herd immunity (at least partly) for diseases like smallpox or measles and to maintain it, cost a lot of lifes.
This is exactly what can be seen in the number of measles cases before the introduction of the vaccine in 1967. Before vaccination every 18 - 24 months enough people without immunity where present, causing another wave of cases. After introducing the vaccination this pattern changes and case numbers went down drastically. See the figure (from reference 1) for illustration. This figure uses data from the US, but you see similar pattern in the rest of the world.

For some more information have a look at reference 2.
Reference:
- Evolution of measles elimination strategies in the United States.
- Vaccination and herd immunity: what more do we know?