Anthropomorphism
Anthropomorphism is the ascribing of human personality, appearance, conduct, cognition, or other attributes to non-human entities, often including non-human animals. In fiction and folklore, it is specifically the endowing of non-human characters with human-like behaviors, speech, facial expressions, etc; common examples include intelligent talking animals, talking trees, anthropomorphized food, and sentient toys.
As a general human tendency, anthropomorphism is considered innate to human psychology. Personification, which usually refers to a literary device, is the related attribution of human form and characteristics to non-animal organisms, inanimate objects, or abstract concepts such as nations, emotions, and natural forces like weather or the seasons. Both have ancient roots as storytelling and artistic devices, and most cultures have traditional fables with anthropomorphized animals as characters. People have also routinely attributed human emotions and behavioral traits to wild as well as domesticated animals.