Natural selection is the process whereby organisms better adapted to their environment tend to survive and produce more offsprings, whereas other less favourable traits tend to become eliminated. Genetic drift refers to random changes in gene frequencies that usually occurs in a small population and results from chance processes alone.
Example - A population of red beetles live in an area. Suppose a colour variation arises during reproduction, giving rise to one green coloured beetle instead of red. This beetle passes the colour on to its progeny, so that all its progeny beetles are green. Crows cannot see green-coloured beetles on the green leaves of the bushes, and therefore cannot eat them. So the progeny of green beetles is not eaten, while the progeny of red beetles continues to be eaten. This gives rise to more green beetles than red ones in the beetle population. Here the green coloured variation became common because it gave a survival advantage. In other words, it was naturally selected by the crows. Increase in number of crows results in more red beetles being eaten and subsequent increase in proportion of green beetles in the population. Thus, natural selection is directing evolution in the beetle population. It results in adaptations in the beetle population to fit their environment better.
Suppose another colour variation arises during reproduction in this beetle population, which is blue in colour instead of red. The progeny beetles of this beetle are also blue. Crows can see blue-coloured beetles in the green leaves of the bushes as well as the red one, and therefore can eat them. Initially in the population, as it expands, there are a few blue beetles, but most are red. But at this point, an elephant comes by, and stamps on the bushes where the beetles live, thereby killing most of the beetles. By chance, the few beetles that have survived are mostly blue. The beetle population slowly expands again, but now, the beetles in the population are mostly blue. So here the colour change gave no survival advantage. Instead, it was simply a matter of accidental survival of beetles of one colour that changed the common characteristic of the resultant population. The elephant would not have caused such major change in the beetle population if the beetle population had been very large. So, accidents in small populations can change the frequency of some genes in a population, even if they give no survival advantage. This is the concept of genetic drift, which provides diversity without any adaptations.