The question is one of the most often asked of authors, and I am always inclined to quote the great line from Ernest Hemingway's The Sun Also Rises:
How did you go bankrupt?” Bill asked.
“Two ways,” Mike said. “Gradually and then suddenly.”
That was my own path to publishing a novel: gradual, then sudden.
There's really no science to the process. I've always believed it's a matter of perseverance, talent, and luck (not necessarily in that order). Now fantasy writer Jim C. Hines has created a fascinating survey that backs up many of my preconceptions while throwing cold water on a few others. Hines asked 247 authors a number of questions about the path they took to publishing success. The methodology is admittedly flawed (this is back of the napkin science), but it makes for fascinating reading, whether you're writing your first book or your fifteenth.
Hat tip: Tess Gerritsen.