*How do you walk away 'clearly, firmly and calmly without being a walkover' when somebody is hitting you?
You either fight back or are branded 'a pussy' and likely the future choice of the bully who wants a compliant victim.*
This isn't what happened here though. It was a boy without previous hitting after being wound up. It wasn't a bully who had been smacking him around. In some limited circumstances I can understand hitting back but deescalation is already preferable.
First off, not to be verbally mean to someone in the first place, and to learn to say sorry when you've taken things too far.
Second, after the first hit, to back off and say no firmly, or walk away, or tell them it's not on. (Or, again, apologise for winding them up, which opens up the floor for them to say sorry!)
I've never been in a full on fight. I almost have, when an unknown woman came and slapped me in the face. I took several steps back, asked her what the fuck she was doing, asked her if she was okay. Turns out she thought I was someone else and ended up crying on my shoulder.
I was bullied in school too, and what worked was restorative justice where she had to face up to what she was doing.
I've also worked previously, for many years in a job with individuals demonstrating very challenging behaviors, including squaring up, pushing me, spitting, and being generally nasty. I've had to break people up. I've worked to enable people to remain calm and avoid conflict, and being calm but firm does work.
As I've had to remind many of my old charges, if your retaliation ends up seriously injuring someone, you are going to be the one in trouble, no matter who starts it!