How do the Infinity Gems Work?
The Infinity Gems, originally referred to as Soul Gems, are six immensely powerful fictional gems appearing in American comic books published by Marvel Comics. Whoever holds all six gems and uses them in concert, such as in the Infinity Gauntlet, gains virtual omnipotence and omniscience. In later story lines and crossovers, a seventh Infinity Gem is sometimes added to the primary six.
The Soul Gem first appears in The Power of Warlock, with all six appearing during the second Thanos War story line in an Avengers and Marvel Two-In-One annual, with Thanos harnessing their latent energies to power a giant gem to extinguish every star in the universe.