The Tesseract is an Infinity Stone of unparalleled power that is owned by Odin; it is now stored in Asgard. It exists in the Marvel Cinematic Universe and features predominantly in Captain America: The First Avenger and The Avengers.
Captain America: The First Avenger
It was guarded by the Asgardian’s, the jewel of Odin's treasure room of Relics, but lost during the last age of worship by men on earth. It is found centuries later in the in the 1940's by German and leader of HYDRA, Johann Schmidt, in a box behind Nidhogg in a sculptured mural of the Yggdrasil world tree, located inside a church full of viking warriors entombed within its walls. Schmidt and scientist Arnim Zola harnessed the power of the Tesseract to be used as weapons against the Allies and the entire world. Captain America foils Schmidt's plan to use the Tesseract to launch an aerial attack on the United States, and Schmidt disintegrates into light that shoots into space when he touches the Cube. After Captain America crashes Schmidt's plane, the Cube is later recovered by Howard Stark.
Iron Man 2
While Tony Stark is flipping through his father's notebook, a drawing of a hypercube is briefly seen on one of the pages, possibly referring to further studies of the Cube after recovering it from the bottom of the Atlantic Ocean.
The Cube ended in the hands of S.H.I.E.L.D., and Nick Fury, believing it to be a powerful energy source, asked the aid of Professor Selvig to study it.
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 retrieve 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 secret laboratory where Selvig has been working. The Tesseract activates 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 Dr. Selvig (now completely under Loki's mind control) to 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 on top 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 sceptre 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.