What the heck does "spare the rod, spoil the child" mean?

does it mean not to spank a kid and to spoil them? cuz that isn't right either. I mean, who wants a bunch of spoiled brats running around
23 answers 23