An idiom is a phrase whose meaning cannot be determined by the literal definition of the phrase itself, but refers instead to a figurative meaning that is known only through common use. In linguistics, idioms are widely assumed to be figures of speech.
In grammar, a phrase is a group of words that functions as a single unit in the syntax of a sentence.
For example the house at the end of the street (example 1) is a phrase. It acts like a noun. It contains the phrase at the end of the street (example 2), a prepositional phrase which acts like an adjective. Example 2 could be replaced by white, to make the phrase the white house. Examples 1 and 2 contain the phrase the end of the street (example 3) which acts like a noun. It could be replaced by the cross-roads to give the house at the cross-roads.