Magni is the Norse god of strength and brute force. He's the son of Thor.
The Dragon Riders have entered an ice cave trying to solve the next clue letting then to the treasure of Hamish II. The clue states:
|“||Call on Magni; you'll go astray. Freya, though, will show the way. [src]||”|
|— Third Clue|
Snoutlout then partly breaks the ice with his helmet, setting off a trap that nearly kills him. Fishlegs and Hiccup then realize that the clue is telling them to use fire rather than strength, because Magni is the god of strenghth and Freya is the goddess of fire.