Question: what to do when your 2 year old hits another child?
Answer: Remove your child. You aren't punishing, you're taking preventive action. Until you help your child with his feelings, he'll almost certainly keep hitting. So remove him from the situation to give him a chance to cry, or to laugh -- both of which help him work though fear.