Personification is the attributing of human characteristics, thoughts, or emotions to something that is non-human. It is a rhetoric device that is used to convey something more than a literary meaning of a sentence.
Example: The heavens wept at the incident.
Now, in this sentence, heavens cannot weep but the idea of emotions and weeping is produced through “wept”. Heaven is non-living and it is weeping just like humans do. Hence, the sentence features personification.
Example: The thunder clapped angrily from a distance.
Definitely, the thunder cannot clap. It is a non-living thing but the writer wants to convey the intensity of clapping by a huge audience tickling the imagination of the reader.
Adding personification to a piece of writing can develop a certain tone and more deeply illustrate a work's theme. Hence, it is usually employed in English literature in poems and prose. Books are repleted with instances of such literary device of personification.