Petra isn’t the only girl at Battle School, but she’s the only girl we know about. (As Graff explains, there aren’t a lot of girls in the Battle School because girls aren’t made for battle – “Too many centuries of evolution are working against them” (3.111). No comment.)
Petra is the best sharpshooter and something of a rebel, so she takes Ender under her wing and teaches him how to shoot when he’s in Salamander Army. She later becomes Ender’s commander when he’s a toon leader in Phoenix Army; and even later, she becomes a squadron leader in the final battles. While Petra is a friend, she doesn’t take kindly to losing to Ender, and when they’re fighting the buggers, she momentarily cracks. But she still was probably the first person to take Ender’s military training seriously. That may be why Ender says that she made him who he is today (14.275).