Ultron was an artificial intelligence peacekeeping program created by Tony Stark from the decrypted code derived from the Mind Stone encased within Loki's own Scepter, retooled by himself with the help of Bruce Banner with the intent of protecting Earth from any and all domestic and extraterrestrial threats coming within the future. Possessing multiple host bodies under his control as well as a variant of Stark's own personality, Ultron however had soon deemed humanity itself as the greatest threat to peace on Earth and attempted to create a technological singularity by committing genocide against them, leaving only metal in his wake.
With initial aid from enhanced twins Pietro and Wanda Maximoff, Ultron fragmented the Avengers briefly, but was abandoned by his allies when they discovered the truth of his genocidal intentions. Alone, he tried to use a device composed of both vibranium and Chitauri technology to lift Novi Grad, a Sokovian state, and use it as a meteor to wipe out all of humanity. Ultron nearly would have succeeded, but both he and his plans were foiled by the Avengers. Even after his defeat and destruction, the aftermath of the Ultron Offensive left the world on edge, putting the public perspective on the Avengers in a new light as well as served as the primary event that led to the creation of the Sokovia Accords.
He can be seen entering a portal in the Oasis along with Magneto.