herd immunity

What is herd immunity and what does it have to do with a number called R0?