This phrase is old-fashioned and not common in modern English conversations or writing. Grandma might say she used to give a box on the ears, but it's not said today.
Pro Tip 2/3
Cultural Sensitivity
Physical discipline is less acceptable nowadays; using this phrase could offend some listeners. I was shocked when the old book described how children would receive a box on the ears for misbehaving.
Pro Tip 3/3
Literal Meaning
The phrase refers to a physical clap or hit on the head, not a literal box. In the play, the character threatened to give the mischievous boy a box on the ears.