An idiom is a fixed phrase which is only meaningful as a whole.
All languages contain idiomatic phrases.
Native speakers learn them and remember them as a complete item, rather than a collection of separate words. The object of the verb 'to eat' is conventionally something edible, but as part of this idiom it is something definitely inedible. Non-native English speakers find the idiomatic side of the language difficult to grasp. Native English speakers acquire idioms from a very early stage in their language development. You're getting this advice straight from the shoulder.