There can be lots of reasons why your child is out of control. What you should do depends on why he is out of control. (For the purpose of simplicity, I am going to address this with the masculine gender, though it could just as easily be a girl who is out of control.)
Is this his first experience with school? These days, Kindergarten can be a real shock for kids who have had not gone to childcare or preschool up until now in their lives. It could just be that he is totally unused to having restrictions placed on him. Other children may have already learned “school” skills like lining up quietly, taking turns, sitting still, listening to the teacher’s directions. If your son has not, start by reassuring him that he will learn these skills and it will get easier and easier to control himself.
If he is not out of control at home, is it because you always accommodate him? Perhaps he has never had to throw a fit to get what he wants, because it has always been easy to give him whatever he wants. Again, sometimes with an only child, a parent does not even realize how often he is giving into his child’s demands because there is no other child making counter demands. If that is the case, although it might make life at home harder in the short run, you can lovingly teach him about limits by beginning to set some expectations. Perhaps you are going to ask him to sit at the grown-up table and turn off the tv during dinner. If he has always eaten in front of the tv, this could be a big battle. That’s okay. Right now, you are trying to teach him that life will not always be arranged just as he would like it to be. Just offer him lots of sympathy that it is hard when expectations change but assure him that you are looking forward to having him at the table so that there can be pleasant conversation at dinner. If he has a tantrum, stay with him, empathize that change is hard and keep repeating that it will get easier. The day will come when he will sit happily at the table and share in the dinner conversation. Learning to do this at home will help him to learn to do it at school.
Kids can also lose control at school because they are overstimulated. Again, if he has not been in a group setting before, the shear number of kids could be overloading his system. Or the noise. Or the lights of the classroom. Or the many transitions. Talk to your son. Say, “You seem to be having a hard time controlling yourself at school. Why is that?” If he has a clear answer, go to the solution phase. Talk with his teacher and get her input on ways to give your son some relief. Ideas might include permission to go to a quiet corner, to step outside, or to find a desk that is away from everyone else (or at least is together with quieter students). Some teachers might allow him to wear ear plugs or ear buds (that aren’t attached to anything) if noise is an issue. If light is an issue, maybe he can work underneath his desk. Keep trying different solutions until you find one that allows him to remain in class without over loading.
Does your child lean towards anxiety? This could be another reason he is out of control at school. If this is the case, yelling and running around may be an effort to calm his nervous system. He can learn to replace out-of-control outbursts with other calming, anxiety reducing techniques like deep breathing, closing his eyes, squeezing a ball or stuffed animal. At home you can help him by training him to be able to imagine a calm, safe space so that he can call that image up in his mind when he gets stressed at school.
If none of these possible reasons for his out of control behavior feel right, see if you can get permission from the teacher to observe him at school some day. Just sit in the back of the room and take notes. Write down the time and what you see in language that is neutral as possible (ie, what any objective observer would, not what his loving mother would intuit). Share these observation notes with the teacher and principal of your son’s school. They are experienced professionals and this data will help them make recommendations tailored to your son.