The Tesseract is an Infinity Stone and an Asgardian relic of ancient unlimited power and was considered as "The Jewel of Odin's Treasure Room" by Johann Schmidt.
The Tesseract is an ancient Asgardian artifact of unimaginable power. It was kept in Odin's artifact chamber but came to Earth by accident. It was hidden in a Viking church in Norway and kept under the Tree of Life. In World War II, Johann Schmidt invaded the church and stole the Tesseract. He used the Tesseract to build extremely powerful weapons that disintegrated humans on touch (the weapons also severely damaged normal objects). Johann also used the Tesseract to make large bombs that could destroy capital cities. Johann held the Tesseract before he sent the missiles and it disintegrated (or maybe teleported to another dimension) him on touch. The cube fell in to the Arctic ocean and was found by S.H.I.E.L.D.'s creator Howard Stark some time later. The Tesseract was kept under guard by S.H.I.E.L.D. to make sure that it didn't fall in to the wrong hands. In 2011 Nick Fury called in Erik Selvig and asked him whether he would help S.H.I.E.L.D. with making the Tessesract an unlimited power source.
After falling into the abyss of space, Loki eventually comes into contact with the alien race of the Chitauri and their masters, Thanos and his servant "The Other". Loki promises to retreive the Tesseract from Earth and give it to them in exchange for their army.
Around this time, S.H.I.E.L.D. is planning to use the tesseract to create weapons of mass destruction so Earth can defend itself in the event of an attack by enemies from other worlds. This was due to the battle between Thor and Loki, however, according to Thor, their work with the tesseract was what drew Loki and the Chitauri to it.
About a year after Fury has recruited Dr. Selvig to study the Tesseract, he has now been notified that it is "misbehaving". Fury arrives at a Project P.E.G.A.S.U.S. where the Tesseract opens a portal into space and transports Loki to the S.H.I.E.L.D. base. Loki immediately begins slaughtering S.H.I.E.L.D. agents and reveals that he plans to use the Tesseract to enslave and rule over the human race. The power from the portal even creates an explosion that levels the entire nearby area.
After escaping, Loki has the mind-controlled Dr. Selvig begin to work on the Tesseract to build a device.
S.H.I.E.L.D. recruits Bruce Banner along with Tony Stark to trace the Tesseract as it is emitting small amounts of gamma radiation that only he would be able to trace.
Selvig and Loki later set up the Tesseract-powered device ontop of Stark Tower and activate another portal which opens the door to the Chitauri fleet. Later Natasha Romanoff is told by Dr. Selvig, now free from Loki's mind control, that Loki's staff is able to shut off the portal.
After closing the portal, the Tesseract is taken back to Asgard along with Loki. Though his superiors are angry at this turn of events, Nick Fury defends his decision to allow Thor to take the Tesseract, saying that humanity is simply not at a level where we deserve the cube's power.
Powers and Abilities
The Cosmic Cube, better known as the Tesseract, is one of the most powerful artifacts in the universe. According to Fury, it holds great power that is almost unlimited. Black Widow states that it has enough power to destroy the entire planet. The behaviour of the Cube is inconsistent and random; the Red Skull was incinerated on touching it.
The Tesseract has the capability to open rifts through space and time. This is how Loki transported himself and later, the Chitauri, to Earth through a portal. Thor and a muzzled Loki use the Tesseract to teleport back to Asgard.
It cannot be held by mortal hands. Any mortal who does so will be disintegrated and have their remains sent to another world, as witnessed with the Red Skull. According to The Other, Loki (and the other Asgardians) know its workings as humans never will.
The Tesseract is one of the six Infinity Stones. It is unknown which Infinity Stone the Tesseract is.