From Longman Dictionary of Contemporary Englishteach somebody a lessonteach somebody a lessoninformalPUNISH if someone or something teaches you a lesson, you are punished for something you have done, so that you will not want to do it again → teach
Examples from the Corpus
teach somebody a lesson• He was treating me badly, so I left - I just wanted to teach him a lesson.• They need to be taught a lesson!• I hope a night in the cells has taught you a lesson.• They say they beat Scott up to teach him a lesson.• He would teach her a lesson.• The commander, as an al-Qadhadhfa and ally of the Magharba, should teach them a lesson.• The risk of inflation teaches us another lesson: Do not play it too safe.• It was the old mountain teaching another brutal lesson, that the mountain and its weather does not forgive a mistake.• A japanese Brother and Sister A japanese myth teaches a similar lesson to that of Lilith.• The desire to teach the experts a lesson took on manic proportions.