The Infinity Stones are six powerful relics within the Marvel cinematic universe.
Before the universe began, the stones existed as six singularities that were compressed down into the form ingots with the formation of the universe. They came to be known as relics of immense power and were used by several races to advance their respective societies and wage war.
By the modern age the stones were scattered across the universe; lost or haven fallen into legend. Few knew of their existence and fewer still sought their powers; the search made difficult by the fact the stones has fallen dormant making them difficult to track.
In Captain America: the First Avenger, the Space Stone (in the form of a blue cube known as the Tesseract) was used by Red Skull and his Nazi organization known as HYDRA during WWII to power their various weapons which would be used for world domination. The Tesseract later transported Red Skull to what would by later revealed as the location for the Soul Stone and the Tesseract fell into the Arctic Ocean along with Steve Rogers (a.k.a. Captain America) who would later be rediscovered in the 21st century by SHIELD along with the Tesseract.
In The Avengers the Tesseract, was awoken from its dormant state by the experiments of SHIELD. This draws the attention of Thanos who gives Loki control of the Chituari to take Earth in return for the stone being given to him. The invasion is thwarted by the Avengers and the Tessaract is entrusted to Asgard for safe keeping. Unknown at the time the Mind Stone arrived on Earth; encased within the scepter Loki used to command the alien army and was taken into the custody of SHIELD who were unaware of its true significance.
In Thor the Dark World, the Reality stone (in the form of a red liquid-like substance called the Aether, was used thousands of years ago by Malekith and his army of Dark Elves whom which the planned to use to transform all matter in the nine realms to dark matter and rule over them. They attempted to do this during the Convergence which was cosmic event where every nine realm would align and weaken the barriers between each realm creating portals and various other cosmic phenomena. During ther first attempt to do this, their plans were thwarted due to the Asgardian king Bor and his army of Asgardian warriors by taking the Aether from Malekith so it couldn't be used during the Convergence. In Malekith's defeat he and the rest of his army of Dark Elves put themselves under a type of hypersleep where they stayed dormant until the next Convergence event and the Aether was sealed away under Asgard where it could never be found. The Aether was later rediscovered by Jane Foster (a human who was in a relationship with Bor's grandson Thor) after accidentally transporting from Earth to the Aether's location under Asgard via portal created by the oncoming Convergence event. the Aether then attached itself to her and this later got the attention of Thor and his father Odin. Due to the oncoming Convergence, the Dark Elves reawaken and attacked Asgard to retrieve the Aether and kill Thor's mother. Jane, Thor and his brother Loki then form a plan to extract the Aether from Jane's body and destroy it before Malekith could use it. They would have it seem like Loki betrayed Thor and offer Jane to Malekith and have the Aether be extracted on the spot. Just as Malekith uses a kind of telekinetic power to drain the Aether out of Jane , Thor would use his hammer Mjolnir to destroy it before the Aether could attach itself to Malekith. This plan unfortunately fails and the Aehter attaches itself to Malekith and he goes to Earth to enact his plan as the Convergence commences. Thor and Jane managed to return to Earth and kill Malekith before the Aether could transform the nine realms and the Aether was entrusted to the Collector by the Asgardians due to the danger posed of keeping two Infinity Stones in the same place knowing who might be after them.
In Guardians of the Galaxy, the Power Stone was previously in the possession of Celestials who used it to destroy various planets with it's immense and destructive power. It was later concealed in a metal orb and left in a Celestial temple on the planet Morag where it was picked up by a Ravager named Peter Quill (a human who was the son of a human mother and Ego the Living Planet who was abducted by Yondu Udonta and his Ravager crew at a young age in 1988)thousands of years later before servants of the Kree zealot known as Ronan come to retrieve the stone under the orders of Thanos. Ronan was a Kree general who was outraged by the creation of a peace treaty between his species the Kree and the Kree's "former" enemy race known as Xandarians, he worked with Thanos to aid in the destruction of Xandar and all of it's inhabitants if Ronan helped Thanos retrieve the six Infinity Stones. To do this he was paired with the adopted daughters of Thanos known as Gamora and Nebula. Gamora, who had her family and half her species slaughtered by Thanos wanted to act against Thanos for her life time until she is given the opportunity to do so by selling off the Power Stone instead of bringing it to Thanos as ordered. However after encountering Peter Quill, two intergalactic bounty hunters consisting of an anthropomorphic raccoon named Rocket and a Florus Colossus named Groot and a revenge-driven maniac named Drax. They at first attempt to sell the stone to The Collector but after an incident involving the stone creating a massive explosion due to one of the Collector's servant girls attempting to take it or her own, they realize how dangerous the POWER Stone was and had to give it to the Nova Corps (the intergalactic police force of the MCU).But after an encounter with Ronan leads to the stone falling into his hands. Seeing as how he has the very weapon capable of destroying Xandar on his own, Ronan betrays Thanos and decides to use the Power stone to destroy Xandar himself. To prevent Xandar from being destroyed by Ronan Peter, Gamora, Drax, Rocket and Groot join together to become the Guardians of the Galaxy and convince Yondu and the Ravagers to aid the Nova Corps in protecting Xandar. They managed to defeat Ronan and prevent the destruction of Xandar by using the stone to kill Ronan. They then gave the stone to the Nova Corps to look after on Xandar.
In Avengers: Age of Ultron, experiments on the Mind Stone lead to the creation of the malignant artificial inteligience Ultron who planned genocide against humanity. In the course of the battle the Avengers are joined by the Maximof twins; siblings granted enhanced powers after surviving HYDRA experiments with the stone. The Mind Stone was then used to create a Vibranium robot with the AI or JARVIS (the artificial intelligence created by Tony Stark to aid him in piloting the Iron Man suits) to be used as an alternative to stopping Ultron. This robot took on the alias "Vision" an managed to kill Ultron and become a member of the Avengers.
In Doctor Strange, the Time Stone is under the possession of reality warping sorcerers in the form of a relic called the Eye of Agamotto. It was used by Dr. Stephen Strange to prevent the interdimensional being Dormammu from entering our reality by trapping himself and Dormammu in a never ending time loop until Dormammu drew back his forces, ended his assult on Earth and never return in exchange for Strange breaking the loop.
In Thor: Ragnarok, Loki takes the Tesseract from Asgard during it's destruction at the hands of Surtur and escapes with Thor and various aliens and Asgardian survivors.
In Avengers: Infinity War, Thanos the mad Titan, along with his Children of Thanos, managed to destroy Xandar and take the Power stone, take the Space Stone from Loki and destroy Thor's ship, annihilate Knowhere, kill the Collector and take the Reality Stone, kill her adopted daughter Gamora in order to obtain the Soul Stone, take the Time Stone from Doctor Strange, and travel to Earth to kill Vision and obtain the Mind Stone to complete his Infinity Gauntlet, where, with a snap of his fingrs, annhihilated half of all life in the Universe.
Each stone holds immense power and dominece of an element of the universe; Time, Reality, Soul, Mind, Space and Power. Because of their immense power only beings of exceptional strength can safely wield an Infinity Stone. If a lesser being were to try they would be vaporized in seconds. It is possible for a group of lesser beings to wield a stone together; sharing the power between themselves, but only for a short amount of time.
The stones also appear to possess a vague lever of sentience; reacting when in close proximity to one another and will at times act on the subconscious desire of the wielder. When holding the Power Stone, Peter Quill was given a vision of his dying mother; encouraging him to take her hand, an act he had regretted being unable to perform in the past. A scan of the Mind Stone in Age of Ultron revealed its energy resembeled a brain pattern.
When left unused the stones enter a dormant state; lessening the power but making them easier to be manipulated and studied by others. However, when one stone comes out of its dormant state it becomes more powerful. The awakening of one stone also leads to the awakening of the others.
When in close proximity to one another the stones energy will react and intermingle with one another. The full scale of this unkown but is claimed keeping the stones together for an exted period is dangerous. When the Mind stone came in close proximity to the Space stone, the earthbound stone began releasing large arks of energy.
It is possible to contain a stone inside another object for transport and allow a person to wield it with out needing to touch it. The Power stone was sealed with an Orb in such a manner while the Mind stone was contained within the Chitari scepter.