Stay calm. If you cannot avoid bad behavior, then face it calmly. Try to use a quiet, unruffled tone of voice and words that are neutral and positive. And keep in mind that suggestions ("Why don't you wash your hands now so you'll be all set to eat when supper's on the table?") promote far more cooperation than commands ("Go wash your hands at once!") or criticism ("Your hands and face are really dirty!").
It also helps to turn "you" statements into "I" messages. Instead of saying, "You're so selfish that you won't even share your toys with your best friend," try "I like it better when I see kids sharing their toys." Another good technique is to focus on do's rather than don'ts. If you tell a 3-year-old that he can't leave his trike in the hallway, he may want to argue. A better approach: "If you move your trike out to the porch, it won't get kicked and scratched so much."
Finally, make sure your tone and words do not imply that you no longer love your child. "I really can't stand it when you act like that" sounds final; "I don't like it when you try to pull cans from the store shelves," however, shows your child that it's one specific behavior -- not the whole person -- that you dislike.
Listen carefully. Kids feel better when they know they have been heard, so whenever possible, repeat your child's concerns. If she's whining in the grocery store because you won't let her open the cookies, say something like: "It sounds like you're mad at me because I won't let you open the cookies until we get home. I'm sorry you feel that way, but the store won't let us open things until they're paid for. That's its policy." This won't satisfy her urge, but it will reduce her anger and defuse the conflict.
Explain your rules. It is rarely obvious to a 3-year-old why he should stop doing something he finds fun -- like biting, hitting, or grabbing toys from other children. Teach him empathy instead: "When you bite or hit people, it hurts them"; "When you grab toys away from other kids, they feel sad because they still want to play with those toys." This helps your child see that his behavior directly affects other people and trains him to think about consequences first.