The key to interpreting this verse is the word “rod.” As Michael Eric Dyson, an ordained Baptist minister and professor of sociology at Georgetown University, noted in The New York Times recently, the Hebrew word translated “rod” refers to a shepherd’s rod, which “was used to guide the sheep, not to beat them.” The author of this Proverbs 13:24 (and the other “rod” verses) is saying that parents who love their children will guide, lead, and discipline them — not beat them.
Outside of this passage and a few others in the (non-literal) book of Proverbs, the Bible barely says anything about physical punishment of children. You’ll find nothing aside from a few general references to “discipline.” There are none — count ’em, zero — verses in the New Testament endorsing spanking.
Instead, many New Testament passages discourage hitting a child for any reason. There are numerous commands against physical violence of all kinds and, of course, the famous command to “turn the other cheek” rather than react in anger when provoked. Both Ephesians 6 and Colossians 3 include commands for parents to not provoke their children. Jesus was a defender of children, offered a withering warning about harming them, and taught that violence only creates more violence.