The mad god Thanos devoted his entire life (and since he has been resurrected at least once, his entire after-life) to pleasing the love of his life – Death. When Death decides she needs a champion once again, she brings Thanos back to life. In an attempt to please her, Thanos goes on a quest for the Infinity Gems; the powerful items that power the various Elders of the Universe.
After finally collecting all of the gems through various methods, Thanos brings them together to form the Infinity Gauntlet, a glove that, when worn, gives the user complete power over the universe. What Thanos does with the Gauntlet is the subject of the 1991 Marvel mini-series, “Infinity Gauntlet” by writer Jim Starlin and artists George Perez (issues #1-3) and Ron Lim (issues #4-6).
His first act, seen in the first issue, to impress Death is to kill half of the universe, which he does with a snap of the fingers. The remaining half of the universe, naturally, is not happy about this and sets about to try to stop Thanos. They are aided by a similarly resurrected Adam Warlock, who was Thanos' main nemesis back when they were both first alive.
Warlock helps organize an excursion of as many superheroes as they can gather (Doctor Doom, too) to attack Thanos at his fortress. Thanos, meanwhile, in another attempt to impress Death (as suggested to him by that wily devil, Mephisto) has used the Gauntlet to make himself fallible, so that the superhero army attacking him actually has a theoretical chance at defeating him.
The heroes leave in issue #3, and it is in #4 that the battle takes place. Thanos mows through the heroes like he's a hot knife and they're all sticks of butter. Cyclops is suffocated, Iron Man has his head torn off, Thor is turned to glass – it is not pretty. Finally, only Captain America remains, and in an impressive act of defiance, stands up to Thanos one on one. As Thanos gets ready to smite Cap, Warlock's real plan springs into action. The Silver Surfer swoops in at light speed to snatch the gauntlet away from Thanos. The whole attack was just a diversion so that Surfer could steal the gauntlet. Only the Surfer misses.
Thanos is irate that he almost lost it all (he casually kills Cap, too) and retreats to think things over. Luckily, eventually Thanos is defeated and Warlock gains the gauntlet, which he uses to change everything Thanos had done back to how it originally was, so everyone was back to the land of the living!