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.
(..) One doesn't have a thing to do with the other and you know it. You don't tell me what I know. If you can steal a man's life out from under him and think he won't take a lesson from that, then you're dumber than you look. - Stop it, Dad! - And she's raisin' you a snake, just like herself. (..)2012 Mud