If we go back a century or two, we find that in some countries, children were often beaten, both at home and at school. Now that is much rarer, and may be forbidden in law. The key term to search for this topic is "corporal punishment".