The source novel is pretty clear on the sequence of events.
- When Ender arrives on Eros, he's placed into a flight simulator and learns how to control a single fighter until he reaches a point where he's effectively mastered the simulation. This takes approximately one month.
"Is that all the simulator does?" [said Ender]
"Is what all?"
"The way it plays now. It's easy, and it hasn't got any harder for a while."
- He is then reunited with his toon leaders from Battle School and learns how to control a fleet of ships as Fleet Commander. We learn that they've been training on their own for around three months. He spends a further three weeks training with his troops until he (and they) reach a point where they've effectively mastered the simulation.
The trust was complete, the working of the fleet quick and responsive..."You match them [the buggers], Ender. You're as fast as they are"
- Ender is then told (by Mazer) that they will be entering a new phase of training where Mazer will personally be in charge of programming the Bugger fleet.
This is a lie. At this point, he assumes control of the real invasion fleet.
"So, Ender, we will now begin your education. We have programmed the
computer to simulate the kinds of situations we might expect in
encounters with the enemy. We are using the movement patterns we saw
in the Second Invasion. But instead of mindlessly following these same
patterns, I will be controlling the enemy simulation. At first you
will see easy situations that you are expected to win handily. Learn
from them, because I will always be there, one step ahead of you,
programming more difficult and advanced patterns into the computer so
that your next battle is more difficult,
At the end of the book, the switch is made explicitly clear to him by Mazer:
"Ender, you never played me. You never played a game since I became
your enemy." Ender didn't get the joke. He had played a great many
games, at a terrible cost to himself. He began to get angry. Mazer
reached out and touched his shoulder. Ender shrugged him off. Mazer
then grew serious and said, "Ender, for the past few months you have
been the battle commander of our fleets. This was the Third Invasion.
There were no games, the battles were real, and the only enemy you
fought was the buggers. You won every battle, and today you finally
fought them at their home world, where the queen was, all the queens
from all their colonies, they all were there and you destroyed them
The sequence of events in the film is slightly different. The simulated battles (and his conversation with Mazer) aren't shown. As soon as Ender arrives, he's given immediate command of the fleet.
There is a sequence a few minutes into his "training" where he is given a dressing-down by Mazer and Graff for allowing too many losses in an engagement.
Mazer : "you can't absorb these kinds of losses. War isn't a game where you
get to reboot and start over".
The obvious implication is that by this point, he's fighting with real ships and Mazer is upset about the implication of Ender treating the simulation too casually, failing to preserve his (real flesh and blood) troop's lives.