This question was a subset of the question asked above by @Fedor. However, the answer provides a good framework for answering the current question too.
We have three terms here: expression, idiom and phrase.
An expression is a saying. It may be a colloquial, less formal (or more polite) way of expressing something in less literal terms:
How do you do? is an expression. You don't expect someone to
actually tell you how he is doing; he should just say How do you do?
because it means little more than "hello" [2]
A phrase is a semantically meaningful sequence of words. A phrase is not typically a complete sentence. I consider a phrase to be more like a grammatical construct e.g.
- needless to say
- causing permanent bodily harm
- way of the world
Idiom is more subtle. It can be informal or merely non-literal, and either a phrase or a complete sentence. Here are two examples of idioms that are also phrases:
- brick and mortar (a traditional business, in contrast to e-commerce)
- town and gown (when a school or university is in close proximity with a surrounding community, this is a way of distinguishing between academicians or students versus local residents who are not affiliated with the school)
Here's the subtle part: It requires an idiomatic understanding of language to use these non-obvious forms of speech correctly. Idioms resemble metaphors, but are more general.