Teaching, alongside imitation, is widely thought to underlie the success of humanity by allowing high-fidelity transmission of information, skills, and technology between individuals, facilitating both cumulative knowledge gain and normative culture. Yet, it remains a mystery why teaching should be widespread in human societies but extremely rare in other animals. We explore the evolution of teaching using simple genetic models in which a single tutor transmits adaptive information to a related pupil at a cost. Teaching is expected to evolve where its costs are outweighed by the inclusive fitness benefits that result from the tutor's relatives being more likely to acquire the valuable information. We find that teaching is not favored where the pupil can easily acquire the information on its own, or through copying others, or for difficult to learn traits, where teachers typically do not possess the information to pass on to relatives. This leads to a narrow range of traits for which teaching would be efficacious, which helps to explain the rarity of teaching in nature, its unusual distribution, and its highly specific nature. Further models that allow for cumulative cultural knowledge gain suggest that teaching evolved in humans because cumulative culture renders otherwise difficult-to-acquire valuable information available to teach.