What is the meaning of [Knock Some Sense Into]

To beat someone in order to teach him/her a lesson. May be used figuratively.