After Loki fell from the crystal bridge in Asgard..
in the post-credits of Thor (2011), he was seen in the mirror, apparently possessing Dr. Selvig to gain information on the Tesseract..
The question is where did Loki end up falling?
After the events in Thor (2011) where Loki fell from the crystal bridge, as mentioned in the MCU wikia,
Loki, devastated by Odin's repudiation of his actions, let go of Thor on purpose and fell into the abyss made by the destruction of the Bifrost Bridge.
He fell to the Wormhole, and..
..arrived in a part of the universe called Sanctuary and met the Mad Titan Thanos, who offered a pact that would allow him to become ruler of the Earth while he would take the Tesseract which was being studied by S.H.I.E.L.D.. Thanos provided Loki with a Scepter with a blue gem which acted as a powerful weapon, and also as a mind control device.
After these follows the events in Marvel's The Avengers (2012).
Source: I wrote several scenes for 2011's Thor, including this one.
Loki - who, even falling to his possible death, still grabs for and catches a symbol of power that he can't even use - deliberately lets go and falls away. And I couldn't stand the idea of him drifting around in space. It's that simple. So I suggested a wormhole, just that he fall away to someplace, anyplace, just not lost and drifting around forever.
Yeah, I worked through a lot of stuff writing it. It was still supposed to be darker; the shot where Thor, after Loki falls, looks up at his father, it was originally supposed to be Odin being more severe, less gentle, making Thor look up and say:
"Please don't kill me."