If you want to publish a book, the most important part of your job is marketing. Before you begin to write, ask yourself, who is my reader? Once you know who that is, you need to develop a plan. 
Publishing your book is probably the easier part of the job. Actually selling it is the hard part. Check back for tips on marketing. My book will be out later this year covering this topic.