Small children often lack the impulse control to stop themselves from hitting, pushing, slapping, biting etc. Sometimes they are doing it in play, sometimes in anger, but all the time without a full understanding of the risk involved in their actions.
They need our help in hearing and understanding the limits in compassionate ways. The myth is that you have to punish or up the ante somehow in order for them to learn. Unfortunately when you do that, you are teaching a different lesson. That you have power to hurt (intentionally) and they do not. It breaks trust in your relationship or in their sense of themselves as a growth focused human.
Instead set limits lovingly and clearly. I say "I am not going to let you hurt or do etc" so they understand the boundary. And when they process the emotions around that limit I do my best (on my good days) to offer compassion and support to their process. And they learn. So well. Yes, it takes time, but they get there. And we aren't stuck in a power battle on the way there.