An idiom is a group of words that does not literal meaning of word. For example, once in a blue moon- means sometimes. Idiomatic language beautifies literature piece. Phrase is using a group of words instead of one word. Phrase gives the same meaning as words used. For example- As ill luck would have it- is a phrase meaning unluckily.
An idiom is a phrase where the words together have a meaning that is different from the dictionary definitions of the individual words, which can make idioms hard for ESL students and learners to understand.
Example: "add insult to injury": To make a bad situation even worse.