Jane Foster: [slaps Loki.] That was for New York!
Loki: I like her.
Loki: It's not that I don't love our little talks, it's just... I don't love them.
Volstagg: If you even think about betraying him...
Loki: You'll kill me? Evidently there will be a line.
Loki: Malekith! I am Loki of Jotunheim, and I have brought you a gift! [Throws Jane to the ground.] I only ask for one thing in return; a good seat from which to watch Asgard burn.
Frigga: Please, don't make things worse.
Loki: Define "worse."
Sif: I have this completely under control.
Thor: Is that why everything's on fire?
Answer: Loki has been shown to exhibit numerous powers in the movies that can explain how he knew about this conversation. In all the movies, he has been shown to appear in hologram-like forms in different locations. For example, in The Avengers, he uses this power to meet up with The Other who is in the middle of space, whilst he is on Earth. In the end credits scene for Thor, he was able to watch over Selvig and Nick Fury's conversation despite not being there. In Thor: Ragnarok, he was able to see into Valkyrie's past through touching her head (though this power was not established until Thor: Ragnarok). Any of these powers could have been used to find out about this conversation between Thor and Odin.
Casual Person