Some, like sweet cherries, have even evolved elaborate biochemical mechanism to ensure that their flowers can not be fertilized by themselves or by very genetically similar individuals.
Humans have very strong taboos against mating with relatives.
Even fruit-flies apparently have a sensing mechanism to avoid too close of inbreeding, even in a closed population they maintain more genetic diversity than they ought to by random mating. Because in general, it is quite bad for a population or an organism to be very inbred. We generally think that mutations arise only once in a great while. That is certainly true for individual genes and specific kinds of mutations. Of these mutations about 1.5 are deleterious, in other words would cause harm to the animal if they were homozygous.