He is not yet five, which is still really young. His reaction is normal for his age. He needs some coping skills, and he will need help learning them. If you're around when these things happen, you can help by mediating a little. Help your son articulate for the other child why he is upset. "Please don 't so X. When you do X, I feel..." Then help the other child, who is also probably young and unaware how his actions affect others, learn what to do, and perhaps assist with apologies.
If you're only hearing about these things after the fact, talk with your son. Listen to him, let him tell you how he felt, then model for him how to navigate the situation using words. Don't be surprised if it takes awhile for him to learn to do this. Also let him know that many younger children simply don't understand that their actions impact others. A three year old who knocks over a tower of blocks is probably not doing it to spite another child. He is doing it because it is fun, and he hasn't learned empathy yet.
If this is happening in a daycare or preschool environment, a responsible adult should be helping the children learn to be socially appropriate and at least be working toward the kids being respectful of other people. If the adults who are there aren't stepping up, or are just telling you son to stop being a baby, that would not be okay, and would need to be addressed.
If your son was trying to walk away from a child who was not behaving well this evening, he is already more mature than many his age who do not recognize the value of strategic retreat. The child who followed him and continued to throw balls at him should have been called on his bad behavior immediately and not been allowed to pursue your son. If something like that happens again, find the adult who is responsible for that child and let him/her know what is going on.