We had a bit of this conversation in the other thread, but I'll copy what I put there - this is a good topic.
Here's how I do it. I write pretty much exclusively fantasy, so some of what I do is really only important for that, but take what you will from it.
First, I plan the world. This is something you can do even if it's set in a real place, only you'd be doing more research than inventing in that case. But for any world, there are tons of things to consider. I narrow it down to geography, politics, and religion to start. (And, though I forgot this in the other thread, history.)
Geography: What does the land look like? You want to make sure you consider various geographical areas, especially if you're creating a world from scratch. Entire worlds of desert/forest/plains/whatever get boring fast, so mix it up. Look at maps of real places if you're not sure where to start. Mountains are always next to deserts, for example. Swamps have different plants than plains.
Politics: What countries/other settlements are there? How are they divided, and how is each run? (I do geography first because it tends to dictate resources, which are very important in politics.) What currency do they use? Are they patriarchal, matriarchal, or is power shared equally?
Religion: Closely connected to politics, but still distinct. Are you using a real religion? What complications come with it? Or, if you're making up a religion, do they worship a deity, multiple deities, a concept, a living person? (Religion doesn't have to be a big part of the story, or exist at all, but it's rare to find humans without religion - just look at the myriad religions that exist in the real world.)
History: How was this world created? What important events happened in the past that shaped it into what it is now? If you're creating a new world, it's good to have one or two world creation myths for it, depending on what different people believe. You can pick one as what "really happened" or have multiple options that could all be true, depending on the faction that believes it - much like we on Earth have the scientific versus religious world creation myths.
Also, if you have a magic system or non-human intelligent species here, this is a good time to plan those out. All magic systems have rules, and all creatures were created somehow and would have different societies based on their morals. (If you're using something common, like vampires/werewolves/etc., you can still come up with a unique society/creation myth for them.)
After the world is created, I look at characters. Every named character should have a story, from the main character down to the shop keeper we see only once. Of course, the main character is going to be your focus when you start giving them backstory, but if every character has a story and you know that story, it's going to come through in the writing, even if not a word of that story actually makes it into the final draft. What is their family like? Childhood? Where are they from? What do they want from the future, and why? If you're not sure where to start with backstory, consider what they are now. A character who has trust issues likely has been betrayed in the past, even multiple times. A character who is always smiling may be trying to hide something - or they could be genuinely content. Every facet of personality comes from somewhere.
So, once you have the world and the characters, it's time to focus on plot. This is the hard part.
When I outline, I write a general outline of each chapter. It helps me to know the end before I start outlining, but it's not necessary. My main outline is very, very basic, all bullet points. (Chapter One - main character interacts with this person, this person. Main character has this issue. Chapter Two - main character does this action, goes this place. Very basic.) I don't start writing in any detail until the outline is complete. If I think of something that needs to go in, I add a note about it in that chapter's bullet points.
After I have the whole story outlined, I start writing. If I find that I get stuck at any point, I write a much more detailed chapter outline. Still bullet points, but exact events. (Chapter Six - main character goes to the tavern and meets secondary character. They clash initially over dropped papers, but main character's school rival enters and main character has to ask secondary character to help deceive school rival. Etc.)
So... That's a summary of what I do. This is basically a mash-up of how my favorite teacher explained outlining and how my favorite author explained worldbuidling to me. This is the process that works for me, but of course everyone does it a little differently.