I'm glad they got caught. That will 'teach them a lesson'! [=they will learn that they should not do that again]
We 'learned our lesson' the hard way. [=we learned from an unpleasant experience]
They studied the 'lessons' [='teachings'] of the great philosophers.
(..) She's just excited about the holidays. Yes, and she's not taking my feelings into account at all. Maybe it's time I teach her a lesson. How? Hmm. It'd have to be something heinous, something that makes her as miserable as she's making me. (..)2014 TvShow: The Big Bang Theory Title: The Clean Room Infiltration Season: 8 Episode 11