Full spoilers follow.
The setup. Loki arrives through a Tesseract-opened portal at a S.H.I.E.L.D. facility, steals the cube and uses his scepter to enslave the minds of Hawkeye and Dr. Erik Selvig. Nick Fury responds by activating the Avengers Initiative, gathering Rogers, Stark, Banner and Romanoff, with Thor arriving independently to reclaim both his brother and the Tesseract.
The trap. The film's central twist is that Loki's capture in Stuttgart is deliberate. He wants to be brought aboard the helicarrier, because his real weapon is proximity: the scepter amplifies the team's existing resentments while Barton prepares an assault from outside. Stark and Rogers discover that S.H.I.E.L.D. has been secretly developing Tesseract-based weapons — a revelation that poisons what little trust exists — and the ensuing argument in the lab is exactly the fracture Loki needs. Barton's strike cripples the helicarrier, the Hulk goes on a rampage that nearly kills Romanoff and pits him against Thor, and the team scatters.
The death that assembles them. Phil Coulson is killed by Loki while attempting to stop the escape. Fury then throws Coulson's blood-stained vintage Captain America trading cards in front of Stark and Rogers — a manipulation he later all but admits to, since the cards were in Coulson's locker, not his jacket. The lie works anyway: grief accomplishes what authority could not, and the argument about who is worth what ends.
The invasion. Selvig, still controlled, activates the portal device atop Stark Tower, and the Chitauri army pours over Manhattan. Loki's confrontation with Stark in the penthouse produces the 'I have an army' / 'We have a Hulk' exchange, and a failed attempt to enslave Stark — the scepter cannot reach him, deflected by the arc reactor in his chest, a neat literalisation of a man protected by the thing that nearly killed him.
The turns in the battle. Romanoff frees Barton by giving him a concussion — a blunt, unglamorous cure that undercuts the mystique of mind control. Banner arrives on a motorcycle, delivers the film's calmest line about always being angry, and transforms deliberately, converting his curse into a decision. The Hulk then flattens Loki mid-monologue and dismisses him as a 'puny god,' which functions as the film's ideological knockout as much as a physical one.
The ending. The World Security Council, over Fury's objection, launches a nuclear missile at Manhattan as a containment measure. Fury tries and fails to stop it entirely; Stark intercepts the warhead and carries it up through the portal, destroying the Chitauri command ship — which reveals that the entire army is neurally linked to it, so every soldier drops the instant it dies. Stark falls back through as Romanoff, using Loki's scepter, closes the portal, and the Hulk catches him. He survives.
What it means in retrospect. The victory is deliberately unstable. Loki is muzzled and returned to Asgard with the Tesseract, the team disperses rather than institutionalising itself, and a news montage shows a world now aware it is not alone — Fury's closing observation is essentially that Earth has announced itself. The mid-credits scene confirms the cost: the Other reports the failure to a master who turns out to be Thanos, and the warning that challenging these heroes means courting death recasts Loki as a subordinate, his scepter as a loaned asset, and the whole invasion as a probe rather than a war. The post-credits scene answers that dread with the opposite register — the team eating shawarma in silence, too exhausted to speak — which is the film's final thesis: the mythic thing that just happened was done by people who now need a meal.