@Yetanotheruser, that’s pretty much the definition I’m using. Others may use some other definition.
Many figures of speech, clichés, and slang are idiomatic in this way, but not all of them. Some of the examples in this thread are clichés based on metaphor and other figures of speech. And some therefore do have a literal meaning (you can understand them literally, such as, just to pick an example, jumping in a lake). Much slang is really metaphor, and some of it is brilliantly metaphorical. Some of the richest extensions of the language come from slang (but that is another topic). Not all of it is idiom, though; some of it is straight substitution of a new term for an old one.
When you can’t derive the meaning of the whole expression from a knowledge of all the terms in the expression, that’s an idiom, as I understand it.
Also, to speak idiomatically is to speak the way people really use the language, irrespective of technicalities. For example, certain prepositions follow certain verbs in idiomatic speech. There’s no rule, exactly, and the preposition is not part of the verb, but that’s just the way we say it. Example: to result in. “Failure to attend class regularly will result in a poor grade.” I don’t see any logical, inherent reason why we couldn’t use a different preposition, say “at,” there, but we don’t. We who speak idiomatic English say “result in.”
These are the kinds of things that English learners may have trouble with even if they’ve mastered all the individual words; the whole may be greater than (or just different from) the sum of its parts.
In the end, though, @Ailia is going to have to use the definition of idiom that her teacher is using if she wants to get credit for doing her assignment correctly.