Choose your genre
The first step in writing a book is to choose a genre, and it will be a wrong idea to choose one based one the genre that sells best. Look into your bookshelf, and find out what motivates you the most, the kind of books you read often and would love to read at any point in time. This will be a determiner in how much passion you would put into writing your book. Write for yourself, and not for the market; you will definitely enjoy your ride.
Start from the end
The hardest part of any story is the ending; this has been proven over time. Before starting, reach out your imaginations to how your story ends, else you'd get stuck and have no idea how to conclude. Try to work your way backwards; what is the fate of your characters at the end? How is it linked with the idea you have? Answer imaginative questions and be sure you have an end to your story.
Create your characters
The soul of good writing is gotten from the characters that make it up; this is why you should create your characters before you begin to write at all. Most times, what holds people down and connected to a book is the character(s), and they hardly ever forget what they've read due to the strong connection they had. Draw out your characters by writing a character biography, understanding the character's motivation, the character arc/development, and the struggle.
Make an outline
After setting up your characters, the next step is to create an outline. Let your outline give a brief overview of what happens in each chapter, delineate the primary struggle in the book and how events and characters clash into one another. It is not meant to be a smooth step; give room for improvisation.
Write the first draft
This is where you draft out your thoughts. You can begin anywhere; that is why it's called a first draft, it doesn't have to smooth and perfect. Break down the mold and push yourself to the edge of creativity. What happens when one character meets with another, and the events that follows afterwards; all should be drafted out. At this stage, you discover your story yourself; what your book will be about.
The first draft might not take you so much time, as you just dabbled your thoughts down. Rewriting takes a very large percentage of your writing process. Turning your first and rough draft into something other people would enjoy is not an easy task; you shouldn't rush this stage and end up with a book that's not worth anything. Take your time and allow patience. Don't bother about getting spellings and sentences right; you can always take care of that in editing.
You are closer to finishing up your book. Editing your work might be a little sober, as you may have to delete your favorite sentence or word; scrap those amazing imageries, and rewrite those poetic lines you spent so much time on. While you edit, watch out for too many adverbs, incorporate synonyms to avoid using shabby words, delete words and sentences that aren't necessary, and most importantly, ask a friend to look over it or even a professional editor.
You have just written your first book. It probably took you months, or years even, but it'll worth it at the end of the day if you worked diligently. Now is the time to party; think of launching your book, and enjoy!