How do we know exactly that animals are showing affection when we think they are?
There are several ways that animals show affection to each other [1].  Some animals will show affection by sleeping next to each other, or with their eyes closed or blinking slowly [1][2].  Other ways that animals show affection is by grooming each other, or by softly chirping or mewing [1].  Some animals will groom each other to show that they trust each other, or that they enjoy being together [2].  Kitties will often give subtle signs of affection by wrapping their tails around their loved ones, or placing their tails on their loved ones bodies [1].
Scientists who study animal cognition agree that animals “think”—that is, they perceive and react to their environment, interact with one another, and experience different emotions, like stress or fear [3]. Whether they are “conscious” in the same way that humans are, however, has been widely debated in both the fields of ethology (the study of animal behavior) and psychology [3]. Animals can communicate emotion to one another, but this does not qualify as language [3]. Language is an exchange of information using non-fixed symbols (speech) [3]. Animals produce innate signals to warn or manipulate other animals (such as the screech of an eagle when it encounters predators) [3]. They cannot vary these sounds to create new signals that are arbitrary and content-rich, as do humans [3]. Scientists have also observed animals for decades, and have learned a lot about their behavior, including whether they are conscious [4]. For example, people who watch wild animals don’t question whether they’re conscious or not because we see incredible intricacies of behavior and vast ranges of personalities [4].