Let’s say they have hit you; you say “no” then gently move them away from you and calmly walk away. If they have hit you with a toy, I would say “no” then I would take the toy and put it somewhere the toddler can see it but can't touch it. Keep it away at least until they’ve finished having a tantrum over losing the toy.

Another example is if they run away when you say it’s time to get into the car, I would calmly pick them up and put them in the carseat. In other words, follow up your request with action which lets them know you're in charge, not them. They won’t learn the first time, maybe not even the 50th time. It’s about consistency as they are about impulses and knee jerk reactions.