The following is the definition of metaphor in the Macmillan English Dictionary.
Metaphor: a word or phrase that means one thing and is used for referring to another thing in order to emphasize their similar qualities.
While similar to a simile, the metaphor doesn’t use like or as when making its comparison.
Simile: a phrase that describes something by comparing it to something else using the word ‘like’ or ‘as’, for example ‘He eats like a pig’
How to identify a metaphor
A metaphor is a type of comparison: when you use a word or phrase metaphorically, you are using a meaning that has developed from the literal meaning and has some of the same features.
In the following example, the phrasal verb, in bold, is first used literally and refers to a physical action. In the second example, it has a metaphorical meaning and describes an action that is similar.
The pirates dug up their buried treasure.
The journalist dug up some interesting facts for her article.
Other examples of metaphors
Eating healthy food will help your body fight disease.
A blanket of snow covered the garden.
She flew past me on her bicycle.
After discussing their concerns, things are going smoothly between them.
The UK is a melting pot of cultures.
I can play that tune by ear.
Extract from: Language Awareness: Metaphor by Dr Rosamund Moon.