After stepping through a particle field, you find none other than the computer who has been trying to kill you all this time. Her name is GlaDOS. She says that she has a surprise for you, but before she can deploy the surprise, something falls off of her. Go grab it. It is some kind of purple sphere that looks like an eyeball.
There is an incinerator at the back of the room (opposite from the particle field), and there is a red button on the side of the room to the left of GlaDOS (from the point of view of the particle field). Go put a portal on the ceiling above the incinerator, then go to the side room with the red button. Make a portal on the wall near here, and then press the red button. This opens the incinerator. Drop the purple sphere through the portal and into the incinerator.
Turns out that the purple sphere was the GlaDOS's morality core. She sounds much more sinister after it's destroyed (although didn't she say earlier that Aperture Science equipment can function at temperatures up to 4000 Kelvin, meaning the morality core couldn't be destroyed in the incinerator? But maybe that was a lie?) and says that the morality core was installed (perhaps hastily) after she kept flooding the place with a deadly neurotoxin. Which she's about to do again. You have six minutes to stop the neurotoxin.
However, the morality core apparently had some 'ancillary responsibilities': it gave her control over her turret defenses. It's actually good news for you, because you can create a portal on a wall that the turret can aim into, and make another portal on the floor below GlaDOS. Do that, and then make the turret shoot through the portal at GlaDOS. This will knock off another personality core.
It lands on a light fixture. Just make a portal behind it and pull the core through. This core is yellowish and seems to be her curiosity core. Dump it into the incinerator as before.
Make the turret shoot GlaDOS again, and a blue personality core will fall off. It lands on a ledge above GlaDOS, so you will have to shoot a portal high up on a wall and drop down to get it. I'm not entirely sure what aspect of personality this one is supposed to be. It recites cake ingredients, interspersed with the names of dangerous-sounding chemicals, deadly surgical implements, and fish-shaped garnishes. Maybe this is some kind of memory core? But at any rate, incinerate it like you did with the others.
Finally, make a rocket shoot GlaDOS again, and another core will fall off, this time floating in mid-air (held on by some sort of tractor beam that GlaDOS shoots out). Use a portal to fall down and grab it. This one is red, and it growls and snarls, not saying any actual words. What is this, an anger core? Why make an AI equipped with rage?
Well, anyway, incinerate that thing. Then watch the ending. Congratulations, YOU WON!!!!!