Rogue touches John's skin and absorbs his powers, enabling her to calm the flames.
This scene depicts Rogue also absorbing the emotions of others unlike other scenes in the trilogy, as she seems to be grimacing while calming the destruction that Pyro has created. In the X-Jet, Rogue is thrown out of the jet, but is rescued by Nightcrawler, she thanks him.
When Senator Kelly arrived at the mansion, the X-Men realized that Magneto intended to use her to absorb his abilities in order to power a machine that could only be operated using his magnetism, but weakens the user so much that it will kill them if it used for long periods of time.
Magneto intended to use the machine to mutate world leaders.
The X-Men (Cyclops, Storm, Jean and Wolverine) stopped the plan, but Rogue was left with the white streak in her hair from the stress of using Magneto's machine.