Tolkien's Legendarium was a lifelong work, and indeed the work has continued long after his death. The Hobbit, written in 1937, was the world's first public look at his mythos, and he followed soon after by starting the writing of The Lord of the Rings (published 1954-1955). The only other piece dealing with Middle-earth published in his lifetime was The Adventures of Tom Bombadil (1966), a collection of poems dealing with Tom, some of which appear in The Lord of the Rings.
Tolkien died in 1971, and control of his writings passed to his son, Christopher Tolkien, who he appointed his literary executor. A number of unfinished writings have been published posthumously, being edited and arranged by Christopher Tolkien. Most notably, these include The Silmarillion (1977); The Children of Húrin (2007), being an expansion of a major story contained in the Silmarillion; and Unfinished Tales of Númenor and Middle-earth (1980), a collection of stories in various stages of completion.
Much like Unfinished Tales, The History of Middle-earth (often stylized HoMe), a 12-volume set published between 1983 and 1996, contains many of Tolkien's notes, drafts, and ideas for the formation of the world of Middle-earth. Edited by Christopher Tolkien, they provide insight into some of the thoughts behind the writing of the Middle-earth Legendarium.
Additionally, Tolkien's Letters deal with The Lord of the Rings in many places.