This is a wonderful short video from Ted talks on how to create fictional worlds.
There are no set rules of how to do this, but Kate Messner offers some good advice on ways you can go about it. To start with, consider the genre the book will be written in and start with a timeline of the world. What is it’s history, key events and social elements that bind the different characters or groups of beings together within the book? Then consider the magical or scientific rules of the world. Are there wizards with magic in an alternative universe, or is it set far in the future where humans have left Earth and are colonising the galaxy.
Whatever rules you create for your world – keep them consistent, for in stories even with the most powerful wizards or mages there are still rules that they will have to live by. These rules can mean whether they succeed or fail in the quests or tasks they undertake.
Also, consider the origins of the human species and the very early tales that were told by our ancestors. Tales that involve the wilderness and myth can provide great insights into how the human mind works, what drives us and what engages our attention the most.
From Ted Ed:
Why is J.R.R. Tolkien’s Lord of the Rings trilogy so compelling? How about The Matrix or Harry Potter? What makes these disparate worlds come alive are clear, consistent rules for how people, societies — and even the laws of physics — function in these fictional universes. Author Kate Messner offers a few tricks for you, too, to create a world worth exploring in your own words.
[…] Setting is a key component of a good story. Writing a scene where a detective interviews a suspect in a police station is very different to one where that same interview takes place in a beer garden over a couple of pints. When and where scenes and stories take place are decisions that authors make all the time. For an Epic Fantasy or far future Sci-Fi novel, these decisions can be more important to the overall story. Worldbuilding can be thought of as a logical extension of those authorial decisions on a much grander scale; writers likely have all the necessary skills for worldbuilding, and need only a framework to develop their fictional worlds. […]