Understanding an idiom requires some other knowledge than knowing the words used. Idioms normally cannot be modified or the words within them changed.
Example
'I lost my head completely' as an idiom means 'I got very angry', whilst literally it means something very different.
In the classroom
Idioms are an area of language that learners and teachers find very enjoyable. Authentic material offers a good source of contextualised idioms, and teachers can encourage learners to guess the meaning from context. An interesting exercise in a multi-lingual class is to compare idioms from different cultures and languages.
Further links:
https://www.teachingenglish.org.uk/article/shakespeares-idioms-lesson-1
https://www.teachingenglish.org.uk/article/proverbs-idioms
https://www.teachingenglish.org.uk/article/exploring-metaphors-classroom