What is the difference between a phrase and an idiom?
A phrase is “a small group of words standing together as a conceptual unit”, while an idiom is “a group of words established by usage as having a meaning not deducible from those of the individual words”. So, the difference is that an idiom as an established meaning not directly linked to the individual words. Any idiom is a phrase.
As an example, “raining cats and dogs” is both an idiom and a phrase. “A herd of cats” is a phrase but not an idiom.