An idiom is a phrase or expression, which has a figurative meaning, rather than a literal meaning.
The difference between Literal and Figurative Meanings
A literal meaning is exactly what the phrase says.
A figurative meaning is not intended to be taken literally. It is a figure of speech.
Let's look at an example:
