The Einherjar Guard was a member of the Asgardian army of elite warriors, the Einherjar. He was killed and replaced by Loki.
After Thor and Loki departed to Svartalfheim, Odin sent the Einherjar Guard to check the battlefield and inform him of the outcome of the battle.
Loki, presumed deceased by Thor, was waiting and killed the Einherjar Guard to take his place and return to Asgard. In this form, Loki reported to Odin and was able to get close to him.