Modern humans are all too closely related for genetic distance to cause problems, but you'll get nowhere if you try mating with a bonobo, and in the past, interbreeding between homo sapiens and other closely related hominids would likely have been a hit and miss affair, with many pairings producing sterile or unhealthy offspring or no offspring at all.
It's something that all sexually reproducing organisms have had to deal with; the behavioural adaptations that animals have for finding a healthy balance between inbreeding and outbreeding are imperfect and variable, and can cause an animal to be attracted to a member of another species when there isn't the slightest chance of genetic compatibility, or they can cause an animal to fail to be attracted to perfectly suitable mate, but on average they work out so that most members of a species are more attracted to more genetically compatible mates.