J. R. R. Tolkien had worked since 1914 on various legends in his mythology-for-England; but in 1926, he sent a number of his narrative poems to a friend, R. W. Reynolds, including the story of Turin; with the stories he wrote a text titled "Sketch of the Mythology". It would be of relatively minor significance it it weren't for the fact that Tolkien began using this "Sketch" as a basis for further revisions and reworkings; somewhere around 1930 he used the work as the outline for another work, which he called "The Quenta, or The Quenta Noldorinwa, or Pennas-na-Ngoelidh". This would itself undergo further revisions and reworkings, and in 1937, he submitted a part of it to George Allen & Unwin as a proposal for where to go after the success of The Hobbit. The title he gave that incomplete portion was Quenta Silmarillion. Fatefully, they rejected the proposal (they thought the work too strange and Celtic), and Tolkien instead went on to write The Lord of the Rings instead. He didn't drop the other work, though; he continued to revise, and for a while still retained some hope of publishing it together with The Lord of the Rings. In the 1950s he returned to it, but found endless puzzles arising from the fact that the only version of it ever completed was the one from 1930; everything else was revised piecemeal. And despite never giving up on it on, he mostly just picked at and puzzled through various issues until his death in 1973.
Christopher Tolkien, who inherited all his father's papers, had as one of his projects getting The Silmarillion -- the work that his father had always wanted to publish but had never quite been able to -- into print. The problem, again, is that the only complete version of the main part of the work was the Quenta Nolodrinwa, and in the course of writing The Hobbit, The Lord of the Rings, and thinking through various parts of it, there had been a number of quite important modifications. Further, it had not been revised evenly; parts of it had been reworked extensively and parts had hardly been changed at all, leading to any number of inconsistencies. With some help from a Canadian research assistant, Guy Gavriel Kay, Christopher Tolkien attempted to blend the many disparate materials that had been left behind. In some cases, he was able to remain quite close to his father's actual words; in other parts, he had to reconstruct parts of a later story out of older versions that were not always perfectly consistent with the tendencies of the later versions; sometimes he had to work up something out of what were only outlines and timelines. In one case that Christopher Tolkien particularly highlights in The War of the Jewels, the chapter "Of the Ruin of Doriath", he had multiple inconsistent versions, all of which had problems, and largely had to work up a new version, in part by discussing the problems through with Kay. Christopher Tolkien would later come to regret this, as having been based on a forced choice (abandon the work or alter the story) that was not actually forced. But in any case, in 1977, The Silmarillion was published.
It was savaged by reviewers, who by and large hated it. They didn't like its seriousness; they didn't like the fact that it lacked unity of plot and character; they didn't like the many strange names; they didn't like the style; and probably there was a bit of reaction against Tolkien fans, since there are always reviewers who will hate things that inspire significant numbers of people with enthusiasm. But commercially it sold moderately well, not at the level of The Hobbit or The Lord of the Rings, but well enough.
There has been a recent fad in certain sectors of criticizing the work for Christopher Tolkien's extensive editorial hand; unfortunately, there is a childish view of literary creation, common among academics, in which nothing is 'authentic' unless it is provably the author's intention. It is, to be sure, a view for which Christopher Tolkien himself had some sympathy; I read an interview with him once, I can't remember where, in which he mentions he had a recurring dream of meeting his father and being criticized for some of his changes, and he is on record as having said both that he probably should have waited and that he would have done some things quite differently if he had spent more time studying all the different versions first. Nonetheless, I think, this is simply wrong. The Silmarillion performs a needed function for the other works, one J. R. R. Tolkien himself had recognized was needed, despite his inability to convince others of that fact. It is a function that is not fulfilled, that cannot be fulfilled, by The History of Middle Earth, Christopher Tolkien's attempt to give a full discussion of all the variants; and indeed, something like The Silmarillion is necessary for that kind of discussion even to be useful at all. If Christopher Tolkien hadn't attempted to pull his father's versions into a coherent narrative for The Silmarillion, he would still have had to do something like it for the kind of variant-discussion some of his critics think he should have done instead. No doubt some things could have been done very differently; but Christopher Tolkien was doing better than he knew when he did it, regardless of what imperfections it might have.
The Silmarillion, which, as I'm sure you figured out by this point is the fortnightly book, consists of five parts: the Ainulindalë, about the formation of the world; the Valaquenta, about the Valar; the Quenta Silmarillion, or Silmarillion proper, about the Silmarils, holy gems forged from the light of the Two Trees; the Akallabêth, about Numenor; and Of the Rings of Power and of the Third Age, about the events given more development in The Lord of the Rings. As such it constitutes a compendium covering the history of Middle Earth from the Music of the Ainur to the end of the Third Age.