In the book Ender's Game, Humanity has been attacked by a bug like race called Buggers (or Formics) twice. Realizing that a third attack would be inevitable, the world government. the International Fleet, began to breed military geniuses. Masters of Tactics and Strategies, they would be the commanders that would face and destroy the Bugger threat. Because they were training children since birth for these positions, all training was in the form of "games." Ender Wiggins was the Undefeated master of these games. None could hope to ever defeat him.
Ender was monitored at a very young age for qualities that the government sought for military commanders of the International Fleet. When he was six years old, Ender was taken from his family on Earth to the Battle School to participate in the training program. There, along with hundreds of the brightest children of Earth, he began his course of study in many subjects. None of these, however, was as vital as the games in the Battle Room. All the children were divided into armies. These armies would have mock battles in zero gravity. Ender, who was at first mocked because of his youth and size, excelled. He soon began to dominate the soldier standings. After a few short years, Ender was given command of his own, brand new army. The army, named Dragon Army, used Ender's innovative techniques and strategies to win every single battle they ever fought.
The officers in charge of developing these children (namely the Administrator of the Battle School, Colonel Hyrum Graff) were not only interested in their progression in the games; but sought to evaluate their personalities. Ender had made many enemies in his advancement to the top of the soldier, and later commander standings. When Ender unintentionally humiliated his old commander Bonzo Madrid after a battle between their armies, Bonzo's longtime hatred for Ender became murderous. Bonzo and some of the other children who also resented Ender, managed to confront Ender alone in the showers. Ender fought Bonzo in a one-on-one fight and defeated him. Despite being naked, unarmed, and alone and against an opponent older and larger than him, Ender had prevailed. His evaluators had been waiting for a test such as this. Having seen Ender's success, they quickly promoted him.
Ender then took an extended leave on Earth. It was recognized that he had lost his motivation in continuing his training. Colonel Graff arranged a visit from Ender's sister Valentine. After a private talk with Ender, she managed to put things back into perspective for him. Ender was ready for the next step of his training.
Graff accompanied Ender to Command School. Here Ender's primary form of education took place on the simulator. The simulator was a holographic projection, much like a video game, that allowed Ender to control constructs of space ships in flight. Ender progressed from controlling a single ship, to commanding and entire fleet of ships. Ender began to study under Mazer Rackham, the man who had won the previous war against the Formics. Ender also began to work with some of his former schoolmates from Battle School through the simulator. He commanded the entire fleet assigning objectives and missions to the other children.
Mazer began a series of battles with Ender that Mazer himself had programmed. These were to simulate an Earth invasion of the Formic systems and homeworld. The battles grew progressively harder and the stress was beginning to take its toll on Ender. At great expense to himself and the other children, Ender won the simulation by defeating all the Formics and destroying their homeworld.
Unusually, a large number of civilian and military observers viewed the final battle with the Formic planet in the simulator room with Ender. Upon the planet's destruction, the small crowd grew into an uproar of cheers. It turned out that this last series was not a simulation at all. Ender was told that all his commands had been instantly relayed to actual ships in combat. The destruction of the Formic world was real. Ender had destroyed and entire race of aliens.