The war started when Loki attempted to distract his brother Thor from his takeover of the Nine Realms by releasing 75 prisoners from the Vault, the Cube, the Big House, and the Raft onto Earth. Thor joined with the Avengers to capture the escaped super villains but left Asgard in a vulnerable state, as the Odinsleep had claimed Odin.
As the Avengers captured and combated the escaped villains, the Nine Realms (excluding Midgard) fell under the control of Loki and his army. After the Masters of Evil and the Avengers were transported to the other Realms by the Norn Stones, they realized that Loki had take the Nine Realms and was planning to take Midgard as well.
After most of the Avengers and the Asgardian freedom fighters came to Asgard, they charged Loki's Forces and managed to free Thor. Loki used Odin's stolen powers to beat the heroes into submission and destroyed Captain America's shield. Iron Man then arrived wielding Uru armour, attacked Loki and gave the heroes time to recover.
Ant-Man, Hawkeye, and Black Panther found the source of Loki/Odin's power: Yggdrasil and uprooted it, cutting off Loki's power and allowing the party of heroes to end the battle and return to their Realms.
Shortly after this, Captain America was knocked out by the Skrull Imposter as part of the Skrull Invasion.