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.
(..) How did you get here? Where are you right now? We're dreaming? You're in the middle of the workshop, sleeping. This is your first lesson in shared dreaming. Stay calm. If it's just a dream, then why are you...? COBB: Because it's never just a dream, is it? (..)2010 Inception