First, it's essential to be sure the child is capable of the desired behavior. Then the rules, reasons, and consequences of disobeying them must be explained clearly in advance. And parents should set a good example. For instance, if children hear parents swearing they can hardly be blamed for doing the same thing.
Positive reinforcement got a bad reputation when kids were given rewards for everything they did correctly, and some children became spoiled as a result, but it's important to acknowledge approval when they do what is right even if only with a few words.
Of course parents should not give in to children's demands or they loose their authority in the children's eyes. However it's important to consider the cause of misbehavior because sometimes the child may not be able to help doing something wrong, or their actions might be a reaction to stress.
There are varying opinions about spanking kids. Some people call spanking child abuse while others think it's essential. When I was a child I was spanked, but only for doing something extremely dangerous. One of my ECE teachers said in cultures where children who disobey may be eaten by a wild animal, step on a land mine, or get shot, spanking is the norm, but in peaceful societies with little danger corporal punishment is less likely to be used.
When young children do something seriously wrong, punishment should be immediate and consistent. Consistency is important for all ages, but delayed punishment, like not being allowed to do something fun later, works for older kids. In some cases with all kids simply explaining why they shouldn't have done something is all that's needed.