Suppose I said,
Larry is a bag of dirt for doing something like that.
I'm using a metaphor. Larry is a person, not a bag of dirt. But the speaker means to say that Larry is a really disgusting person for doing what he did. (We think of dirt as disgusting, so we make that connection.)
Word meaning: A bag that is filled with dirt.
Speaker meaning: A really disgusting person.
Metaphor occurs when word meaning differs from speaker meaning.
CJ