Up until this point in the story, in Battle School, Ender has been the primary target of bullies, just like he was at home. Bernard is the ringleader of the bullies in Ender's launch group, and despite losing the "war of the desks," it seems that he will continue to target and pick on Ender in any way he can.
This is until their first day in the Battle Room. All of the launchies are equally clueless as to how to control themselves in the gravity-less room. In his typical fashion of figuring out how things work on his own, Ender quickly discovers that he is not alone in his ability to problem solve. Alai is also figuring things out quicker than the others in the group. Also, he notices that though Alai was seemingly part of Bernard's group, he did not "push off in the same direction as Bernard" (chapter 6). When the two end up near each other, Ender quickly dissolves the social barrier between them by drifting toward him.
Alai is the one to suggest they work together to figure things out.
The two are of course successful, and they celebrate their success together by cheering, then forming a small group together to freeze the rest of the launchies.
Though it seems like Alai and Bernard head up this group, Alai and Ender both know who really did it. And this breaks the tension. It seems that Alai has a natural ability to bring people together, and he does exactly this in his launch group. He also obviously realizes Ender's intelligence and talent, and instead of fighting it, decides to make Ender a friend. As a result, Bernard's power is weakened, and Ender is no longer such a target of ostracism.