On The Origin of Species by Charles Darwin Chapter 8 Page 7

are increased by, use or habit, and are diminished or lost by disuse, so I do not doubt it has been with instincts. But I believe that the effects of habit are in many cases of subordinate importance to the effects of the natural selection of what may be called spontaneous variations of instincts; — that is of variations produced by the same unknown causes which produce slight deviations of bodily structure.

No complex instinct can possibly be produced through natural selection, except by the slow and gradual accumulation of numerous, slight, yet profitable, variations. Hence, as in the case of corporeal structures, we ought to find in nature, not the actual transitional gradations by which each complex instinct has been acquired — for these could be found only in the lineal ancestors of each species —