Well first you write it. Then you need to get it professionally edited. And now you rewrite. This can take anywhere from a period of 6 months to a few years, depending on how hard and fast you work. Usually editors can help you with this, but you'll need to find a publishing company. They will evaluate your work and decide whether or not to publish yours. Lots of contracts are involved, you may need a lawyer.