"Thus spoke Mandos in prophecy, when the Valar sat in judgement in Valinor and the rumour of his word was whispered among all the Elves of the West. When the world is old and the Powers grow weary, then Morgoth, seeing that the guard sleepeth, shall come back through the Door of the Night out of the Timeless Void; and he shall blacken the Sun and the Moon. But Eärendil shall descend upon him as a white and searing flame and drive him from the airs. Then shall the Last Battle be gathered on the fields of Valinor. In that day, Tulkas shall strive with Morgoth, and on his right hand shall be Eönwë, and on his left Túrin Turambar, son of Húrin, coming from the halls of Mandos; and the black sword of Túrin shall deal unto Morgoth his death and final end; and so shall the Children of Húrin and all fallen Men be avenged.
The best I could find regarding the mechanism:
According to the prophecy, Morgoth will discover how to break the Door of Night, and will blacken the Sun and the Moon. For the love of these, Eärendil will return from the sky and shall meet Tulkas, Manwë, Eönwë (with the old version of his name Fionwe) and Túrin Turambar on the plains of Valinor.
There the forces of the Valar shall fight against Melkor and The Dark Powers. Tulkas will wrestle with Morgoth, but it will be by the hand of Túrin that finally death and destruction will be dealt to Melkor.
Break the door of Night and Blacken the Sun... But a battle will ensue meaning I think it's the effect of this combat (terrible war) that will blot out the Sun and Moon. Smoke, fire etc. will have that effect both at night and day.
Of note is that the prophesy itself is brought into question:
It must be mentioned here that "Dagor Dagorath", the name properly said, was not used by Tolkien in The Lost Road or in The Shaping of Middle-earth. All the occurrences of the term in these books were in the editorial notes of his son. The canonical mentions of the name are only in Unfinished Tales. Christopher Tolkien included the name in The Shaping of Middle-earth because the first mention of the Second Prophecy of Mandos was placed there but Tolkien did not mention the existence of a Prophecy in the text published in Unfinished Tales. The manner with which the name appears in Unfinished Tales suggests that there are some kind of "foretelling" of The End but does not state that it comes from one of Mandos' prophecies.source