How herd immunity from coronavirus is developed

A safe and effective vaccine is not expected until at least 2021, so how does herd immunity work, and how can this method help in getting us back to our lives and preventing the spread of COVID-19?