"How do you generate maps?"
Generating the maps involved nothing more than drawing on (yup!) the blue lined graph paper of yore. My first module used two facing sheets 8.5x11 sheets, to be printed on the inside cover of the module. (Think Caves of Chaos, or any of the classic 1st Ed modules. This was actually a selling point for Joseph Goodman ... that guy is the COOLEST. But I digress.)
I sketched the maps in pencil, using ink pens for clarity once I was satisfied. Once Goodman ok'd the maps, I made a few changes to help drop my word count, and then he sent the maps off to a professional cartographer who will draw/CAD what you see in the actual module.
Essentially the process was identical to designing a dungeon crawl for play at home. Flesh out the descriptions, copy in the stat blocks, and tada! You've just earned yourself a nice paycheck, writing credits, and a spot on the rack at the local gaming store.
Way easy. Way cool.
There are dozens of companies doing d20 work, some better than others. You need to be certain that your writing will be supported by good art, design, packaging and distribution . Both Zeitgeist and Goodman Games come highly recommended.
One last note: the entire process might have been swamped if MNTS and Silverfyre/TSG hadn't agreed to playtest the module. I don't have a local group, and playtesting turned out to be vital in shaking out the gaps and broken bits.