My parents didn't hesitate to let me know who was boss when I was young. They weren't afraid to slap me on the wrist or spank me or whatever. I think that laid a foundation of respect for my parents. I learned from a young age who was in charge, and I was to obey them. As I grew older, they didn't have to smack me because they had trained me to obey them.
But if your 2 year old kid is drawing on the walls at your house, and you say "No! Don't do that!", they'll look at you funny and continue. If you take the crayon, and say "Stop drawing on the walls" and then hand them some Legos or something, they'll be drawing on the walls again the next day. But, if you take the crayon and smack 'em in the butt, they'll associate drawing on the walls with getting smacked, so they'll stop.