What is the term called when the author gives human characteristics to nonhuman things?
"Personification" is the term used for when the author gives human characteristics to nonhuman things.
Personification is used to provide imagery. It's a good tactic when describing an inanimate object or abstract thing that's not human. Personification helps the reader and/or viewer to better understand and visualize the situation, object, or topic, since we're all familiar with human actions and mannerisms.
Some simple examples are:
The river babbled happily.
The gate snickered in the wind.
Silence suffocated them as the tension taunted gleefully.