Spanking only works on the small ones who do not have higher brain functions. Essentially you train them the same way you train a puppy -- behaviorism using rewards and punishments.

As your child develops -- which requires interacting with them to HELP them develop -- the need for simple physical punishment fades in favor of more effective suasory techniques.