The ending of Thor: The Dark World closes the Malekith story and quietly swaps the king of Asgard for the god of mischief. Malekith is destroyed when his own ship crushes him, so the threat to the realms is over, but Asgard has lost Frigga and Thor has lost his appetite for the crown. When Odin offers him the throne, Thor refuses, saying he is not ready to rule and that he wants a life with Jane on Earth. Odin accepts his decision.
Then comes the twist. After Thor leaves, the figure on the throne is shown to be Loki, who has secretly taken Odin's form. Why does that matter? Because it leaves the Asgardian throne in the hands of a trickster who everyone, Thor included, believes is dead after his apparent sacrifice on Svartalfheim. It is also not a throwaway: in Thor: Ragnarok, Thor returns home to find that Loki has been posing as Odin.
In my opinion, this is the smartest move the film makes. Thor turning down the crown gives his arc a human cost, and Loki's return hands the next Thor film its first problem to solve. It could be argued that the Malekith plot is the thinnest part of the film, because the Aether story moves quickly and gives the Dark Elves less room than the brothers get.
Is it okay to skip Thor: The Dark World? You could, but I would not, since you would miss Frigga's death, the Loki switch that Thor: Ragnarok depends on and the Collector's interest in the Infinity Stones. At 112 minutes it is also a light commitment.