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.
(..) pantsing and it won't be my last. And you were right about my motives. I was hoping to establish a relationship with penny that might have someday led to sex. Well,you got me out of my pants. Anyway,I've learned my lesson. She's out of my league, I'm done with her. Got my work,one day I'll win the (..)2007 TvShow: The Big Bang Theory Title: Pilot Season: 1 Episode 1