
Rap somebody on/over the knuckles
Metaphorical Use
It's metaphorical, not literal. No physical action is involved, just verbal or written criticism or correction. 
Mild Criticism
The phrase implies a mild or moderate form of correction, rather than a severe punishment. 
Informal Setting
This phrase is often used in informal contexts among friends, family, or coworkers. 