The published Silmarillion ends with the recounting of the voyage of Eärendil the Mariner, but in the older versions of the Silmarillion as published in The History of Middle-earth this was not yet the end. The Silmarillion originally ended with a prophecy by Mandos about the Final Battle (or the Dagor Dagorath in Sindarin). The account is clearly inspired by and bears many similarities to the Norse legend of Ragnarok.
According to the prophesy, Melkor will discover how to break the Door of Night, and will destroy the Sun and the Moon. For the love of these, Eärendil will return from the sky and shall meet Tulkas, Manwë (or Eönwë his herald) and Túrin Turambar on the plains of Valinor. All the Free Peoples of Middle-earth will participate in this final battle, Elves, Men and Dwarves alike. To their number will be added Ar-Pharazôn and the Númenóreans who landed at Aman in 3319 SA.
There they shall fight with Melkor. Tulkas will wrestle with him, but it will be by the hand of Túrin that finally death and destruction will be dealt to Melkor. Túrin will run his black sword Gurthang (Iron of Death) through Melkor's heart, thus avenging the Children of Húrin (Sind: Chîn Húrin), and the Pelóri Mountains will be levelled. The Silmarils will be recovered from the Earth, and Fëanor's spirit shall be released from the halls of Mandos to give them to Yavanna, who will break them and rekindle the light of the Two Trees. The battle will end and renew Arda's existence: all the Elves shall awaken and the Powers will be young again.
Following this, there will be a Second Music of the Ainur. This song will sing into being a new world. Men will sing it with the Ainur. It is unknown what the fate of the old races, or of the old world, will be in the new one. Even the Ainur do not know anything of the second world or the Second Music. All the Ainur know is that the Second Music will be greater than the First Music.