I think they just immerse themselves in an alternate universe and start thinking it through and writing about it. I've looked at my share of the nonfiction books claiming to tell you how to write, but art is never enjoyable as a formula. Reading other good authors, saturating yourself in various themes and ideas. Learning how to write the gist of a story without doing the beginner mistakes of writing everything down.
I think moderating a roleplaying game would be a very good way to start, since that requires a lot of creative flexibility which is what keeps stories going. An author can take a prompt, an idea, a whatever and spin it into a yearn. That's their talent I would think.
Also be very easy on yourself starting out. It's like learning to sculpt statues. Obviously your first results will be very bad until you start finding your voice, which is learning how you want to write a story. Don't go any further than short stories to start, don't burn through all your mega ideas in the first couple of attempts to learn dialogue and action. But again, the best teacher would be just to read stories with good dialogue and pacing and consciously understanding how they present their material. Another guy was talking about Dune for instance, which is a book about internal monologues interspaced with conversations in a set of jump cuts. That's an intesting style, although there are others. Anthology collection tend to help since they have many short stories by numerous different authors. You might also want to try a writer's circle to keep your motivation going.
Unless this is nonfiction. Well, that's very different