When you render fiction to its most basic form, there are really three main kinds of worlds. The first is set here in the modern world (at the time of writing). There may be a few slight differences, but by and large it will be the world as the author knows it.
The second is the historic world. These worlds often exist during the 20th Century, mediaeval Europe and Ancient Greece/Rome. They are used by Historical Fiction authors for the most part and require quite a bit of research to construct. A good knowledge of history is essential before embarking on this kind of story – more so, than is covered by the majority of secondary school curriculum.
The last world is sprung purely from the imagination. You will generally see this kind of world in fantasy and science fiction novels. “High Fantasy” or “Sword and Sorcery” novels generally incorporate worlds that are similar medieval Europe, with a few extra ideas such as magic and invented religions. Science fiction novels on the other hand generally speculate on how this world or universe will exist several years in the future, the kind of life that might exist on other planets, or can be set in alternative worlds/realities.
If you are going to write a fiction novel set in this world, you will have to consider how much you know the world around you. For a start, have you travelled much? If your characters are going to have tea in a coffee shop in Moscow, it may be a good idea to go to Moscow and drink tea in a coffee shop there, just to see what it is like. Another reason to have a good knowledge of geography is to decide where your characters live and work. You don’t want to fall into the trap of having a rich character living in a poor area or vice versa.
Regarding historic worlds, there is a lot of research involved here. You will have to recreate a world that you never lived in. A good bit of expert information is needed. A notable author in this genre is Robert Harris. If you look at the Acknowledgments page at the back of Pompeii, one of his most notable books, you’ll find the list of sources there is huge. He sought the advice of leading academics. I suggest that you not attempt this unless you are really obsessed with history, and have a good knowledge of the period in question to begin with.
Regarding fantasy and science fiction universes, you need to strike a tight balance. Your world has to be close enough to this one in order for the human mind to comprehend it. You could, for example, change all the laws of physics, but chances are it will be so complex that an ordinary individual will not understand it. However, things that can be changed without baffling your reader include the layout of the land and the cultures that inhabit it.
Also use logic when you’re choosing where your various cultures exist. People that inhabit colder areas are going to dress differently from people that inhabit a warmer area. You should also notice a difference in the species of animals that inhabit different colder/warmer parts as well.
A good knowledge of geology can help make the world you construct more believable. Researching economics and politics can help build your cultures. If you are going to build different races and species, learn a bit about genetics and how animals are structured physically. I don’t mean for you to do a PhD’s worth of study; just have a general awareness of how these things work. For politics and economics, watching the news might just be enough. At the end of the day though, poor research shows.
I should also stress that there is a great potential for overlap here. A novel could be set in Ancient Greece/Rome, but with Daleks from Doctor Who thrown in. A very good example of an overlap can be found in Harry Potter. Hogwarts and Diagon Alley don’t exist in the real world, although London and England do. This is a great mixture of the ”real world” and fantasy.
I hope this has been helpful for you. I must stress that this is simply how I would tackle the problem of building a world. You may disagree on some of the points I made, but it still should be food for thought.
For fantasy worlds, I think that we have a good discussion relating to this, but not exactly it, in the “Fantasy Parameters” thread in writing discussion.