Both natural selection and genetic drift are mechanisms for evolution (they both change allele frequencies over time). The key distinction is that in genetic drift allele frequencies change by chance, whereas in natural selection allele frequencies change by differential reproductive success.
If the frequencies of traits in a population change purely by chance , then genetic drift has occurred. This may happen when a random subset of a population dies (i.e., from a natural disaster or from indiscriminate human hunting). The remaining individuals are left to pass their traits to later generations, but the population has changed, so evolution has occurred.
Natural selection is the process by which the most adaptive traits for an environment become more common generation after generation. It is not a random process. However, it also is not a purposeful process. If a trait enhances an organism's ability to reproduce, then that trait will be more likely to pass to the next generation compared to a trait that does not enhance reproductive success. Natural selection is the process by which these adaptive traits become more common in a population.