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.
(..) Dialogue: Marked=..,Default,NTP,!Effect,Good afternoon, Amanda.\NGood afternoon. Dialogue: Marked=..,Default,NTP,!Effect,Welcome to your first flying lesson. Dialogue: Marked=..,Default,NTP,!Effect,Well, what are you waiting for?\NEveryone step up to the left side of their broomstick. (..)2001 Harry Potter and the Sorcerer's Stone