Din's Fire is one of the three spells of the Goddesses that Link receives from the Great Fairies in Ocarina of Time. The other two spells are Farore's Wind and Nayru's Love. It can be used to light torches and defeat enemies, but is usually not necessary. The only place in the game where it is absolutely required is to enter the Shadow Temple.
Acquiring Din's Fire
To get this spell, you must first have completed Dodongo's Cavern and acquired Bombs. Go to the area outside Hyrule Castle and follow the road until it splits. On the right side there is a sign saying "Dead end". There is also a boulder in front of you. Throw a bomb at the boulder and go inside. Play Zelda's Lullaby on the Triforce symbol on the platform. The Great Fairy will then appear and bestow Din's Fire upon you.