Firstly to help you understand - think about replacing the words -figurative language with the words - words to compare - the words used to compare two things. Then apply the idea of comparing two things to these:
1. Simile - you are comparing two things by saying something is like something else e.g. He was as angry as a swarm of bees or He shouted angrily like a swarm of bees surrounding the aggressor.
(You are comparing the effect of the swarm with the effect of the anger - to be feared - swarms bring panic = anger can panic people also - you might also be comparing the action associated with swarming which is a defensive reaction to a threat)
2. Metaphor - you are comparing two things by saying something is something else. You have now removed the words like or as
example - He swarmed angrily across to Joe
Swarming across the dance floor, he shouted angrily at Joe.
The focus on the word swarming has allowed the comparison with the bees. We say bees swarm but we do not say that a person swarms - in this way you can make a metaphor.
The comparison in personification on the other hand can be remembered by the word found in the first six letters -person
Personification is giving an inanimate object animate reactions. This means that you are making something sound as though it can do what a person can do.
A simple example of this would be - the flag waved. People can wave, a flag needs a person to move it in order for a wave to occur; therefore - the flag waved - is personification.
The clock sighed/ the chair sighed - personification
Try writing some of your own and practise the ideas - if they work you will have found a level of understanding yourself through your examples.