This number can be determined statistically or thoroughly detailed contact tracing (counting the branchings in the infection tree and taking the average) or even theoretically.
If people change their behavior and infect less people the reproduction number goes down. It is thus a combination of both the innate qualities of the virus but also the host behavior. Some diseases even cause host behavioral changes that increase their chances of spreading, for example, rabies that makes the animal more likely to bite, or toxoplasmosis that makes the animal more likely to be biten. Humans are more interesting in that we're technically capable of altering our culture and thus change how diseases spread.
When it comes to infectious diseases, there are five kinds of humans from the perspective of the disease.
1) People who are susceptible to being infected.
2) People who are infected but not infecting others.
3) People who are infected and infecting others.
4) People who are recovered and immune.
5) People who are dead.
A person can change designation several times (except of course those who end up in number 5

Herd immunity happens when the disease can no longer reach enough new group 1 people to keep growing. Recall, to keep growing, it has to infect >1 people for each new generation. If it infects 0.9, say, then the next gen will have 0.9, then next 0.81, and so on .. thus eventually dying out.
Given herd immunity, that is, a sufficient number of people who can not be infected, how large does the reproduction number have to be to find at least one susceptible person?
I find it easiest to think in examples. Lets say R0 is 4 and you're the virus looking to infect 4 random new guys. If 3 of those are already in groups 2, 3, 4, or 5, then there's only one left. When does this happen? It happens once 3/4 of the population is in groups 2, 3, 4, or 5.
Generalizing, the equation for simple herd immunity is thus (R0-1)/R0.
So lets say that herd immunity is reached in this example. 75% of the population is either infected, immune, or dead. 25% still are susceptible. If the virus is introduced from a single traveler, the traveler might (=will on average) infect 1 other person who in turn will infect another... and so on. But soon enough, the odds will decrease to 76%/24% and the new generation will see 0.99 ... the next 0.99^2 and so on .. and the virus will lose traction and die out.
Now lets try multiple travelers and lets say R0 stays at 4 but the number of susceptible people has dropped to 20%. Those travelers still have a 20% chance of meeting a susceptible person and infecting them. However, the infected resident also only has a 20% chance of propagating the disease and so it will die out.
Just to emphasize, that just because the herd has immunity, that doesn't mean that individuals in the herd can't be killed off. It's only the herd that can no longer be killed off.
It's important to distinguish between the reproduction rate and the attack rate. The attack rate is the chance that someone exposed to the virus (because they inhale it, inject it, ingest it, ...) gets infected. It's part of what goes into the reproduction number which also includes how many people a person meets, how they meet, how long they meet (dose), ... and so on.
Animal reservoirs are just like the multiple traveler scenario except these travelers come from the animal kingdom. Obviously social distancing to humans doesn't work here but distancing and avoiding contact with animals by e.g. not building housing in their habitats or using screen doors against insects or outright killing infectious animals work. Basically same idea.
A disease becomes endemic if group 1 (the susceptibles) somehow keep increasing. Childhood diseases in the pre-vaccine era are good examples of this. Here group 1 increases die to new people being born. Measles has a herd immunity of 95% and will pretty much wash through a susceptible population very fast until 95%+ have been infected. Then it dies out there while moving elsewhere. However, after a few years with a 2% birthrate, the number susceptible people has grown from ~5% to maybe 12%. Thus if an infected traveler (from group 3) comes to visit, the infection will spread until the 95%+ threshold is reached again.
Insofar vaccines exist and it's possible to trace down infections all over the planet, it's possible to ensure that it's no longer possible for travelers to reintroduce the disease. The disease has thus been eliminated from the planet. This was done with smallpox. It was almost done with measles...
Alternatively, one could prevent travelers from entering unless they can prove immunity (by vaccination or prior recovery). Many colleges test for diseases before allowing admission. So does the porn industry. Countries could do something similar (a health certificate) for travel and many already do for immigration. Another method would be quarantine. The US used to be well protected simply by virtue of having two large oceans on either side, jungle/desert to the south and ice to the north. For example, the invention of steam powered ships made travel became fast enough for people on the ship to stay in groups 2 and 3 as they made landfall and thus introduce a bunch of new diseases to the north American continent that wasn't possible under sail where transition times were long enough to send the crew into groups 4 or 5. Of course air travel opened a big can of worms in that regard. Perhaps quarantine will become normal?
It's important to distinguish R0 from Rt. The reproduction number changes as the population works towards herd immunity; or change their social behavior. It even changes as the virus mutates and changes its behavior. If herd immunity is possible, then Rt will ultimately converge on 0 as the disease fails to find new people to infect.
With CV19, what appears to be happening in western countries is a complex adaption in behavior from both people and governments that has Rt converging on or rather oscillating around 1. My hypothesis (and it's just mine) is that this is driven by the news cycle and the fact that humans seem to tolerate a certain amount of fear/pain while weighing this against their personal behavior. Thus if people are mainly hearing bad news (from media, colleagues, politicians, friends, ...) they will modify their behavior and bring Rt down. If people are hearing good news (the disease is under control, we're over the worst, ... ) they will modify their behavior and Rt will go up again. Since immediate news is determined by the current disease burden, this acts to keep the disease burden constant. And a constant disease burden happens at Rt->1. Again, this is just my theory for the cultural adaption dynamics. The consequence of keeping Rt around 1 is that the disease will slowly wash through the entire population until either herd immunity or a vaccine is found but it will do so w/o overwhelming the medical system.
In ASEA countries, the behavior has instead been more collective. Individuals have not made their own choices to go out and engage in behavior that increases the reproduction number. Governments have not relaxed restrictions to get back to business as usual either and therefore Rt->0. Since they don't have herd immunity, they therefore have to restrict travelers.