In J. R. R. Tolkien's legendarium, the history of Arda, also called the history of Middle-earth, began when the Ainur entered Arda, following the creation events in the Ainulindalë and long ages of labour throughout Eä, the fictional universe. Time from that point was measured using Valian Years, though the subsequent history of Arda was divided into three time periods using different years, known as the Years of the Lamps, the Years of the Trees, and the Years of the Sun. A separate, overlapping chronology divides the history into 'Ages of the Children of Ilúvatar'. The first such Age began with the Awakening of the Elves during the Years of the Trees and continued for the first six centuries of the Years of the Sun. All the subsequent Ages took place during the Years of the Sun. Most Middle-earth stories take place in the first three Ages of the Children of Ilúvatar.
Tolkien meant Arda to be "our own green and solid Earth", seen here in the Baltistan mountains, "at some quite remote epoch in the past".
Tolkien likened the Last Battle, Dagor Dagorath, that ends "the world" (Arda) to the Norse Ragnarök. Engraving Battle of the Doomed Gods by Friedrich Wilhelm Heine, 1882
Tolkien's legendarium is the body of J. R. R. Tolkien's mythopoeic writing, unpublished in his lifetime, that forms the background to his The Lord of the Rings, and which his son Christopher summarized in his compilation of The Silmarillion and documented in his 12-volume series The History of Middle-earth. The legendarium's origins reach back to 1914, when Tolkien began writing poems and story sketches, drawing maps, and inventing languages and names as a private project to create a unique English mythology. The earliest story drafts are from 1916; he revised and rewrote these for most of his adult life.
Tolkien went to great lengths to present his work as a collection of documents "within the fictional world", including preparing facsimile pages from The Book of Mazarbul to support the story (it was intended for The Lord of the Rings) and to bring readers into his fantasy.