The Avengers, also known as the Heroes of New York, are a team of extraordinary individuals, either with superpowers or other special characteristics. Its purpose is to protect world stability from inner or extraterrestrial threats, and to work with the peaceful interests of the whole world rather than a specific country or organisation.
The Avengers were first assembled by S.H.I.E.L.D. when Loki invaded Earth with his Chitauri army to conquer the planet. The team defeated him and went to their separate ways.
After S.H.I.E.L.D. became a defunct agency, Stark Industries remodelled Stark Tower into Avengers Tower and the team joined the fight against HYDRA. After they finished the war, Tony Stark built Ultron hoping that the AI would be able to defend the world from any threats necessary. The plan backfired and Ultron started a war against humanity, ending with Ultron's defeat. When Ultron was defeated, the team gained new recruits and relocated to the New Avengers Facility.
Under Captain America's leadership, the team successfully completed several operations until the amount of collateral damage caused during their conflicts caused the United Nations to pass the Sokovia Accords in an attempt to regulate their actions. The differences in opinions created a rift within the organisation which split the Avengers into two factions, led by Iron Man and Captain America. After Captain America stopped Helmut Zemo, the instigator of their fight, the team officially disbanded.
However, their disbandment would not last long. Two years after the Accords were ratified, Thanos, the Titan warlord and instigator behind Loki's Chitauri invasion, launched a second attack against Earth in his crusade to gather the Infinity Stones.
The Avengers were split up into different groups as they fought to combat Thanos before he succeeded, joining forces with the Masters of the Mystic Arts, Wakanda, and the Guardians of the Galaxy in the process, with Iron Man and Spider Man going to Titan alongside Doctor Strange and meeting and allying with Star-Lord, Nebula, Mantis and Drax to try to confront and stop Thanos while Hulk, Black Widow, War Machine, Falcon, Thor and Scarlet Witch protected Vision from the Black Order in Wakanda.
While the team on Wakanda was successful in killing Thanos' minions, the team fighting Thanos were defeated and Thanos then arrived and overpowered the heroes on Wakanda with ease and then killed Vision to receive the Mind Stone, completing the Infinity Gauntlet.
Even after Thor came close to killing him, Thanos still won the war as he nevertheless managed to eradicate half of the universe's population, and several of the Avengers were among those victims, including Falcon, Scarlet Witch and Spider-Man. Only Iron Man, Captain America, Thor, Hulk, Black Widow, and War Machine survived.