Lore and History are part and parcel of world-building as a writer. Knowing what happened (and why) allows a writer to project what will happen (and why). History gives your characters roots… all the more so when the details are debatable. Was one man a hero or a villian… well it depends on who you ask.
What are these things for a writer? In many cases, History and Lore are never published. They are notes or sometimes just ideas that the author has and are something that they base their world upon. History is easy enough: this is the major events that have happened in this world. I’ve personally used everything from a chronological timeline to a hundred-plus page document. This is the stuff that you know has already gone before. This is the cold hard facts. Births, deaths, wars, all the framework for what has gone before.
Lore, on the other hand, is what the characters and readers know and feel. This is the story about the valiant rebel who stood up to the bloody-handed tyrant or the murderous brigand who accosted the king’s lawmen. Where history is what the author knows is the truth, lore gives the feeling of real-life. Lore is made up of the urban myths, the rumors, the stories, and the legends. As the author, you may know that the great hero who overthrew the King was actually an ambitious poser, who wanted to take the throne for himself… but your characters might still respect or venerate him because they don’t know that.
History is dry, dusty, and often boring… but Lore, that’s where you can get some interesting character conflicts. Longstanding feuds, cases of mistaken identity, and tensions between clans or nations are all great fodder for writing some interesting character conflict. Exploring how a character deals with such prejudices and overcomes them (or not) can make for interesting reading and fun writing. Granted, this is secondary to making the characters themselves interesting, but it does give you excellent levers on character motivation.
So how do you go about designing history and lore? Well, much of that comes back to what kind of story you want to tell. If you want a story about betrayal, revenge, and star-crossed lovers, then a history of murders and assassinations, with a lore of each family blaming the other, makes for a great setting. Your characters will have a history of violence to draw upon, where such solutions are expected by both sides.
That said, it is easy to go overboard in world-building a history. You don’t necessarily need to know everything. I know fellow authors who do seem to know everything. They have page after page of notes. They know why one group hates another group, why the first group likes the third group, who married who, who killed who… but they haven’t got beyond page ten of their actual manuscript.
The other area to go wrong is the (in)famous infodump. This is where the plot stops and the reader is confronted by a wall of text about why this all matters. Some readers love this, others… not so much. The history and lore you’ve spent so much time on should be there in the background as a framework and as character motivation, but it shouldn’t step up front and stop the action of your story. There’s a balance to strike between the reader having some idea of what is going on versus destroying dramatic tension and pacing by throwing hurdles of text at your reader.
Of course, the other end of the spectrum is where an author has no idea or at best a vague understanding of what has come before. When the reader doesn’t know what has happened and the author doesn’t bother explain why this all matter in the greater scheme of things. An author can pull this off if they have a strong, character-driven story… but it’s a lot easier to have that framework to build upon. If the author doesn’t have a strong story or characters and they have a history/lore that is basically nonexistant… well, then you get a sort of generic story that is at best, not memorable and at worst… pretty much unreadable.
There is a tremendous advantage in being an author of fantasy or science fiction in the ability to craft the lore and history of your world to fit the story you want to tell. A few hours and some jotted notes can give you a universe for your characters to explore and a framework for you to write a more vibrant and alive setting.