D.K.
It isn't necessarily a "boy" thing because I have a daughter who tried to act the way you describe. First, I removed her from gymnastics class, right in the middle of class, and told her we would not be staying since her behavior was unacceptable. I explained the behavior that was expected and she tried the class again the next week. As soon as she started acting up again, I marched into the gym and gently grabbed her little hand and led her out to the car and we left. From that day on, she had excellent behavior in class because she knew that we would leave if she didn't. I also told her that if the bad behavior continued I would stop classes altogether because it was a waste of my time and money. At 4 almost 5 they understand actions and consequences. The days that she had behavior that exceeded my expectations she was rewarded and it was explained to her why she was getting the reward. I praised her other days, don't get me wrong, but those days where she really shined, she got a special reward.
Hope this helps.