Personification
Personification attributes human actions, feelings or intentions to an object, an animal, a place or an abstract idea — 'the house had given up years ago'.
The house had given up years ago. Houses do not give up. The sentence assigns a human act of surrender to a building, and in doing so says something about the building that the house was derelict does not: somebody once tried.
It is a species of metaphor, and the same cautions apply. Dead personifications — time flies, the economy is struggling, the wind bit — are ordinary vocabulary and cost nothing. Live ones are conspicuous and need to earn the attention they take.
The craft use most worth knowing is in close narration. What a character personifies, and how, is characterisation of the character rather than description of the thing. A frightened narrator finds intent in the furniture. An exhausted one finds tiredness in the weather. A cheerful one does neither. Used this way, personification is a form of interiority carried out entirely in the description of a room.
The failure mode is a landscape in which everything is doing something — the trees whispered, the moon watched, the road hurried away — which is purple prose and, worse, empties the device of force. If the whole world has intentions, none of them mean anything.
Addressing the personified thing directly is a related figure: apostrophe.