Personification is a figure of speech where human qualities are given to inanimate objects or abstract ideas. In this case, the trees are given the human actions of groaning and shaking their heads, which are typically associated with people expressing distress or disapproval.