GlaDOS, the AI in charge of Aperture Science, wakes up her newest test subject Chell to put through a set of chambers using a portal-creating gun to solve various logic problems. Chell proves to be a decidedly single-minded and determined woman who refuses to so much as speak a word back as she makes her way through each chamber, even as GlaDOS instructions become increasingly passive-aggressive and mocking about the likelihood of her death.
As Chell becomes more skilled with the portal gun and learns tricks like using momentum from a long fall to cover distance horizontally, GlaDOS replaces one test chamber with a live fire course for military androids, filled with simple-minded and high-voiced turrets that provide an extra emotional torture with their childlike responses to being destroyed. Chell isnt deterred and plows through them all, on the way discovering a space behind the walls where a previous subject had been living, covered in graffiti that GlaDOS has been lying and is just using the tests for her own sadistic amusement.
Another chamber requires Chell to carry a heart-covered Companion Cube throughout the entire puzzle, putting it to all sorts of uses until there is more of a bond formed with it than the regular single-use cubes. Then GlaDOS refuses to let her move on until she euthanizes it in a furnace, further twisting the knife by claiming its the fastest any test subject had ever done it.
The final chamber makes use of almost every trick Chell has learned over the testing, only to end with her being sent into a massive fire pit. She manages to escape with a quick set of portals, and is then finally able to escape GlaDOS game and make her way through the facilitys inner workings, all while GlaDOS makes increasingly desperate and unhinged pleas to stop that eventually turn into death threats. The trip also reveals Aperture was created as a direct competitor to Black Mesa, only to fail miserably.
After using the portals to defeat GlaDOS last-ditch mass turret ambush, Chell finally confronts the computer directly, only for a piece of her to fall off. Chell promptly destroys it in another furnace, only for GlaDOS to reveal it was actually a morality core that was keeping her from outright murder, after she went rogue and killed the entire Aperture staff with neurotoxin. Luckily, losing it also leaves GlaDOS unable to turn off a defense robot, and Chell is able to use more portals to redirect its missiles into GlaDOS and cause her to drop more cores. Eventually shes completely destroyed and Chell is sucked through the roof, but unfortunately in her weakened condition shes quickly dragged right back inside by another robot.