First, be realistic. Your child is going to hit. All kids do! Your goal shouldn’t be to have a kid that never, ever hits, but to teach your child, over time, how to gradually manage her anger and frustration.
Toddlers have limited verbal skills and little control over their environment — that's frustrating. No wonder they lash out sometimes! For the most part, toddlers don’t hit to be mean; they hit because they don’t know what else to do. So your best bet is to calmly remove your child from the situation and distract her with something else, an approach called “remove and redirect”.
In other words, remove your child from the scene of their frustration, redirect them and lovingly but firmly say, “No, hitting hurts.” Don’t waste your time on a more elaborate explanation; your toddler probably won’t understand anyway.
In calmer times, books can help reinforce the no-hitting message. It’s pretty hard to teach your child not to hit if hitting is part of his everyday life. If hitting (or other violence) is part of your family life, talk to your healthcare provider, who can help you brainstorm better parenting techniques and refer you to safe resources if needed.
Michael Lee, MD. (No Date). Teach Toddler Not To Hit? The Bump [Online]. Available: http://www.thebump.com/a/teach-toddler-not-to-hit