The Silmarillion was a collection of world-generation notes by JRR Tolkien. Just like a modern passionate DM would do, he wrote many short stories about his own personal world inside of a journal. Most of it was incoherent and disorganized, as he wrote to it whenever whim took him in a writing mood. For the most part everything he wrote had strong christian influences, and many lines could be drawn between his own creation myth with that of Christianity's; makes sense since Tolkien himself was a Christian. You could easily say that Illuvatar was equivalent to God, and Melkor would be Satan (He's even described as being the most beautiful of the Valar!). Of course, Tolkien died before he could ever put any of this to a book, so his journal was stuffed into a box and forgotten.
But this was not the end of Tolkien's journal. Many years later, his son found the journal and decided to create a compilation of all the short stories. While there were many errors with timelines and such (Tolkien did not actually write it in any semblance of chronological order), his son made a great effort to organize it into the Silmarillion. It is widely considered a...difficult read to say the least and is very often considered very boring (because, as mentioned before, he died before he could assemble it into a coherent narrative). It's definitely written more like a collection of mythological tales like you might find for, say, Greek myths in a school library (only less accessible) than it is like a novel.
In A Nutshell
The Creation Myth
In the beginning, there was absolutely nothing. Then the god Illuvatar began singing. Of course this wasn't just any sort of singing, because to gods like him, singing was a means of weaving raw magic into a pure and physical form. He began his singing by creating his children, the Ainur, who in turn joined him in a new heavenly chorus. There were many Ainur, who were divided into the older and more powerful Valar, and the younger and less powerful Maiar. (Many better-known LOTR characters that are Maiar include Gandalf, Saruman, the Balrogs, and Sauron.) The Ainur each sang a different part of the world into existence, such as Ulmo who created the seas and oceans, and Aule who created the Dwarves, though they were flawed. Some time after Illuvatar found out and was displeased, as only he could make genuinely sapient creatures (that being the Elves and Men, who wouldn't be ready until the stars and sun were finished). Aule revealed he'd created them out of love for Illuvatar and to help the latter's creations, so Illuvatar infused Dwarves with the Secret Fire (true magic of life) to make them truly alive and fix the flaws.
Unfortunately, the First Dark Lord was also in this group. An Ainur by the name of Melkor; described as the most beautiful and gifted singer of all the Ainur, decided that he wanted to create his own song. At first he was simply an arrogant prick, as he hated collaboration and wanted something that was wholly his own creation. Twice in a row he tried this, and each time Illuvatar showed him a new, more beautiful song to both amaze the other Ainur, and show up Melkor. Melkor first created Fire, hot and cold. As a consequence of the creation of Fire, evil was introduced into the world, but also beauty was created as hot and cold made Weather. The second of his singing served to seat evil in the world by warping many creations, such as granting scorpions their tails. For this, Melkor was cast out of the Ainur's Chorus. Embittered and emboldened by his failure, he continued to desire the Secret Fire for himself; lacking the ability to create life on his own, he instead chose to infuse his own power into Arda, attempting to corrupt all of creation toward his will. As a result, his influence lingers even long after his eventual defeat.
The Valar that still wanted to play the Sims got sick of Melkor's shit after he destroyed the two lights they were using to keep Arda (the Earth) from being nothing but shades of grey with chest-high walls. These lamps blew up when Melkor knocked them over, and split the formerly continuous landmass into three separate continents. So they decided that if Morgoth was going to be a griefing little bitch they might as well turtle up in their own corner of the world. And so they went to Aman (the western continent), built two trees to be the lights, and got to work. Eventually they got the DLC for stars, and managed to install Sims: Elves Edition. Melkor was "finally! mobs I can grind for experience!" but the Valar beat him down and brought him back as a captive (but not before he had a chance to infect some elves with malware, turning them into Orcs). Elves were installed in Middle Earth (the central continent), and ported over to Aman in what was later to be dubbed "worst idea ever".
The Elves were working out really well, and levelled up their crafting skills huge. Feanor, an elf king, made three awesome jewels called the Silmarils that glowed just like the two trees used to light up the place. The minute Melkor's ban was over, he posted an apology to /v/alar and asked if he could see what they were working on. He immediately DDoSed the two trees, killing them, and stole the Silmarils and fucked off to Middle-Earth to raid the elves there. He got pwned, and holed up in the roguelike dungeon expansion pack Angband, due to his old Utumno version being too resource intensive.
Feanor was fukkin pissed, so much he couldn't type straight and kept calling Melkor "Morgoth." He was so pissed he picked a fight with another elf kingdom when they said "Dude, just chill". His sons would later pick up his teamkilling habits, the greedy little psychos. He traveled to Middle-Earth, played Angband over and over again trying to get his light-jewels back, and got himself killed (it's a roguelike, duh). His elf kingdom stayed there, split between his sons, his half-brother, his half-brother's sons, his other half-brother's sons, and a king named Thingol who wasn't related to him. besieging and playing Angband for 400 years until Morgoth said "enough already!" and got those damn kids off his front lawn.
Meanwhile, back in Aman, the Valar hastily installed a 3rd-party 'Sun & Moon' patch to make up for the destroyed light-trees. 'Sun' only works half the time, but it's better than nothing and the Silmaril backups got stolen so what're you gonna do? Besides, the elves really liked the stars and would've complained if they completely patched them out. They also bought the 'Sims: Men Expansion' DLC at the same time, and installed it too.
Some of the Men NPCs got into playing Angband. Then the DM made a character for himself, named Beren, started a romance with an elf king's daughter Luthien (the Dungeon-master's-girlfriend's character). Elf-dad was a racist shit, but that would look bad, so he said "sure you can date my daughter, IF you can finish a run of Angband by bringing a Silmaril jewel back to level zero." Beren and Luthie played together, almost got Dark-Souls'd by a Maiar acting as a boss-monster NPC named Sauron, but managed to pull it off. The wedding was on a Tuesday, but afterwards Beren got ganked, and later Luthien became an hero... but she sings some Goth poetry to the Grim Reaper-equivalent who, with Illuvatar's permission, gives them an extra life for finding the Simiaril, and they both live as mortals until they died a second time.
The rest of the elves were pretty sure that a Man and an Elf playing together was some kind of exploit, so they stopped being racist and started playing in teams, even getting Dwarves in on the teams. Unfortunately, Melkor was able to appeal to the inherent LOL RANDUMB of Men and got them to do stupid shit like playing huntards and wiping with Leeroy Jenkins bullshit. Still, not every Man was an idiot, some had high DPS or knew how to tank, so the elves didn't go back to being totally racist. Some men picked up Morgoth's griefing habits and became his underlings, but there were also three bro-tier clans of men closely allied to the elves and fought on the frontlines of the siege, who were collectively known as the Edain.
Blah blah a Man named Turin leaves home, blah blah blah loses his memory and hooks up with his mind-wiped sister, blah blah defeats the dragon Summer Glaurung, totally not his fault he killed his best friend, totally not his fault he knocks up his own sister, when they both find out they become an heroic pair. This was expanded on in the book The Children of Hurin, published well after Tolkien himself died, Turin's dad, who, for having the massive steel balls to tell Morgoth to fuck off to his face Morgoth, like a GM angry no one wanted to play by his rules, cursed his whole family resulting in a story bleaker than Game of Thrones. That's not a lie either, Turin goes through some hard shit in his life before he dies. You thought the Starks had it tough? Think again!
Bro-tier Man named Tuor weds a hot elf shortie named Idril, after a Vala tells him how to get to the Elven version of Seattle, which is where the elves move to after the Angband MMO servers shut down and they lost all their kingdoms. They have a son they name Eärendil. Naturally, since this is a tragedy, Elf Seattle also falls when Eärendil's a kid, all because Idril's creepy cousin wanted to bone her. Again, incest is most definitely not wincest. Together with many other fleeing elves Eärendil ends up south in what was essentially a giant Elf refugee camp, since at this point Morgoth had fucked over nearly every other Elf realm further north. Tuor and Idril's kid Eärendil ends up dating Beren & Luthien's grandkid Elwing, who has a silmaril from her grandparents' adventures. Eärendil and Elwing end up with two kids, Elrond and Elros, but due to the way Eru wrote the code for souls and metaphysics the kids had to choose to be either elven or human. Later, some of Fëanor's sons, still wanting to reclaim their family bling, attack the Elf refugee camp because they know Elwing has it. Eärendil was out at sea while this happened, but Elwing threw herself into the ocean with the silmaril and transformed into a bird to escape, leaving her kids behind. It worked out though, because one of Fëanor's sons suddenly grew a conscience and decided to take care of them.
Eärendil, sick of how everything was getting steadily more grimdark, sails to the western continent with his wife to petition the Valar for aid. Moved, they break forth their mighty banhammers and smite down Morgoth. They ban him so hard that the continent they were playing on, Beleriand, broke and sank into the ocean. The remaining two silmarils were also brought out, and Feanor's two remaining sons saw their chance for an easymode run of Angband. They're told it's a bad idea, they have a quick discussion about whether they'll get banned for this, then raid the camp and pull off the quest, but when they try to equip the silmarils they find they've had an alignment shift to evil and trying to hold the gems hurts them. The older brother Maedhros kills himself, while Maglor goes off to an unknown fate, finally bringing Feanor's party to a TPK.
Morgoth is currently permabanned behind a firewall around Middle Earth, though there's rumors that he'll eventually come back when the server stops getting security updates.
On the way back home from wrecking Melkor's shit, the Valar were impressed with three kingdoms of Men who joined the bro-quest to help elves, and gave them an island to play Numenor on, and let them start the game as Dunedain with plenty of starting tech and every unit constructed starts with elite status. They easily defeated the boss monster Sauron and patted themselves on the back because capturing Sauron was totally their idea. Sauron's a Maiar, so killing him is impossible, he just chilled in the dungeons, and told the Men how awesome they were even though they aren't elves... cause elves are immortal, but it's so great you can still do stuff with your disability. The Dunedain started getting into fad diets and buying life-extension supplements on home-shopping channels, which ironically made their lifespans shorter. "Well, if I was a Valar, I could edit the Sims:Men source code," said Sauron, and the Dunedain totally came up with the idea on their own to attack the Valar to demand an immortality patch. "My old boss Melkor is a Valar, maybe he could help if he was free," and the Dunedain fell for that too.
So the Dunedain switched their game settings to max out military bonuses, and sailed west. The Valar and Elves knew they were getting a full-on /b/ invasion, and appealed to Iluvatar all-father for a government bailout. Illuvatar banhammered the invasion fleet, and did an Atlantis on the island of Numenor for good measure. Sauron was still in jail when the place was rekt, and he lost his sweet Maiar character and had to start over in Middle-Earth. Some Men of Numenor managed to survive, and washed up on Middle-Earth. They still had their cheat-mode bonuses, and easily became kings among men. One of them started Gondor in the south.
The last story is about the gold rings. Sauron fooled people into thinking he was going to play Neutral Good with his new character, and made or helped make new client plugins for all his friends called "rings of power" (he actually did it before the Numenor mess. No way he could have pulled it off afterwards; after drowning with the island, he was resurrected with a massive Charisma penalty and without access to Disguise Alignment spells). Each ring is actually a trojan to be installed to get the account passwords for the kings of men, dwarves and elves. He had a master One Ring that could backdoor all the others, hopefully to turn all the people of Middle-Earth into his personal spam botnet. The Elves and the survivors of Numenor teamed up and wrecked Sauron's shit. Just as the elves started thinking maybe not all Numenorians are greedy shits like the ones that tried to attack Aman, the king of Men Ilsidur decided the One Ring is too 'leet to delete, and kept it for himself. Elves gave up on Men totally. Ilsidur himself died on the way home in a stupid horse accident.