If you get along with someone very well, you have an affinity with them. Sometimes opposites attract, so you might feel a strange affinity to someone who is seemingly very different from you.
When you are attracted to someone or something a great deal, we say that you have an affinity, a natural connection. Likewise, scientists use affinity to describe organisms that are alike or resemble each other. Interestingly, the Middle English word, affinite, originally applied to people who were connected or related by marriage, rather than by biology.