Evolution happens because of genetic mutations. The vast overwhelming number of mutations are deleterious: they are fatal outright or inhibit the fitness of the individual for survival and the opportunity to pass on its genes. The vast overwhelming majority of mutations are not passed on to subsequent generations.
Those mutations that are passed on to offspring confer some type of advantage, generally with respect to the environment under which the organism is living.
Technically, those mutations that get passed on are those that don't fuck it up too badly. There are a lot of mutations that are moderately deleterious to the individual, but which do not act as a barrier to either natural selection or sexual selection. Color blindness, for example, is one that is arguably deleterious to the individual, as it limits the set of wavelengths they can perceive, leading to less overall useable information about their environment. But color blindness almost never has a material impact on the ability of that individual to survive long enough to reproduce, so it isn't weeded out by natural selection. Similarly, color blindness almost never is a barrier to an individual being able to find a willing partner with which to reproduce, so it isn't weeded out by sexual selection either.
There are a whole lot of mutations that have entered our species (all species really) that are elements of Non-Darwinian evolution. Mutations that aren't directly subject to pressures from either fitness or sex.
We tend to think of evolution in Darwinian terms: "That which makes an individual more fit for their environment is more likely to be passed along to offspring, and thereby is propagated through the species". But that's not actually how it works. It really is "That which doesn't produce enough harm to be a barrier is more likely to get passed along to offspring, and may become endemic within a specific population of the species, depending on the size and mobility of the population itself". That's how we end up with low-melanin skin in a good chunk of humans - relative isolation allowed the mutation to be propagated throughout a specific geographic population, and because of the environmental conditions it didn't cause harm enough to prevent it being passed on.