The existence of variation is a prerequisite for natural selection to be able to work. Furthermore, the variation must be at least partly heritable, because if it is not then any differences between variants in their survival rate or their number of offspring will not be carried through to the next generation and subsequent ones. Darwin made the importance of variation very clear in the way he structured On the Origin of Species: the first chapter is called “Variation under domestication” and the second “Variation under nature”. Thus, to get to his main contribution to evolutionary theory, he took a route that started with variation. (“Natural selection” is his fourth chapter).
Not only must variation be heritable, but the mechanism of inheritance must work in such a way as to maintain it. This may seem a strange point to us now, in the twenty-first century, but Darwin was acutely aware of the problem that if inheritance worked by some kind of blending of the contributions of the two parents, then in just a few generations whatever variation there was would have been eliminated. And at the time when Darwin was writing his magnum opus, the idea of blending inheritance was commonplace; it was not until some years later, in 1866, that a different mechanism of inheritance was proposed by the Austrian monk Gregor Mendel. Even then, this different mechanism, which is referred to as particulate rather than blending inheritance, languished in obscurity until its rediscovery in 1900.