Those with autism often have enhanced sensory receptors in specific areas. For instance, they may be able to hear higher pitched noises than most of us or may have a heightened sense of feeling on their tongue or skin. This means that they are more likely to reject things that may not feel very good to them as well as adapt behaviors that feel very good to them. To understand this, imagine how it may feel for you to have someone rub your back. Imagine that you could intensify how good that felt to you as often as you wanted to. That may give you a glimpse into how some people with autism feel.
Thus, when someone with autism hits someone else while smiling, it can mean several things and should be addressed with the autistic child. Sometimes they hit because they understand that touch is an affectionate gesture and simply have not mastered the fine details of that gesture. Other times, the hitting feels physically good on their skin and so they do this for their own enjoyment, though not to be malicious.
Some children with autism hit themselves and in doing so, give themselves a duel feeling of enjoyment. To you, it may seem odd that it would feel good to hit yourself, but to them it may be the most pleasurable feeling in the world and may at times be done when the world around them feels completely unpleasurable.
So what can you do to stop or modify these behaviors? As with any behavior modification program that is based on changing a behavior that feels good to the person doing it, that behavior should be replaced by one that produces a similar feeling. For instance, if you have an autistic child that walks up to strangers and rubs their arm because they get a feeling of pleasure form touching skin, you may want to take them to a material store and let them touch the material. Which one feels best to them? Which one gives them the same pleasure as touching skin? Use that material to make an adequate sized pillow or small blanket tor hanky that the child can use at appropriate times.
If hitting their head feels good to them, then try different techniques such as rolling their head on a mat to produce the feeling of pressure that comes with hitting. Or simply find a totally different activity that produces just as much pleasure for them. Keep in mind also that some of these behaviors are also simply the autistic child's way of narrowing their world down to just them and can be most often seen when the child is tired or upset. Therefore, there should be areas in the classroom where the child can still do some activity to calm themselves down that does not require them to hurt themselves or others.
Remember that though these behavior may seem odd to you, they may be coping skills for those with autism and they may also just be their own version of enjoying perception. You can best help them by finding ways for them to aim at the same goal without doing any harm to themselves or others.