First of all, you're right to be seeking good answers. Violence of any sort is a problem, and of course another child could be injured by this.
Work with the advice of any specialists you're in contact with, and with the school. Take really good advice from the local autism charity as well -they are often a source of ideas and support.
Lashing out for seemingly no reason can be because younger children/those with communication difficulties on top of the autism can really struggle to match up "what hurt me"/ "what scared me" with what their bodies are doing.
Since most of our pain responses are the wrong way round, a gentle jostle or hair ruffling that would be a sign of friendship to others can feel like being struck with a fist to us. Combined with delayed thinking or problems working out who did it, and you can end up with a response that doesn't match anyone's expectations of what should happen.
The knack is to stop as much sensory overload as possible. Play times are a nightmare for most of us (I do schools work and I still can't be in the playground with them in breaktimes - it panics me). A quiet place to go to "cool down" the brain wiring really helps.
Standing in a queue, I can be so worried that people will bash into me, even accidentally. If I'm calm at the start of the day, I can handle it, but after a long day of input I can be totally unable to cope and I need to get out of there fast.
Pictures sometimes make more sense to us than words, when we're trying to explain things. Working out what hurt/what's frightening us can be easier by pointing and thinking, and pictures can be a strong way to say "this is what you don't do". Plus pictures for "this is what you can do if you feel stressed" of course.
Some children just like to see what happens if they do X, of course - not so much out of nastiness but almost as an experiment, without realising that the crying fro the other child is a sign of distress. Really clear instructions on why that is wrong/pictures of it are very important.