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.
(..) Lady Stark is here... Who asked you? You're not Lord Frey yet, not until I die. Do I look dead to you? - Father, please... - I need lessons in courtesy from you, bastard? Your mother would still be a milkmaid if I hadn't squirted you into her belly. All right, you come forward. There. (..)2011 TvShow: Game of Thrones Title: Baelor Season: 1 Episode 9