Writing a book/literary work requires two main components: Loads of imagination and loads of more patience. Being patient is very crucial.
Don't tie up expectations with your work. The outcome of writing a book or novel is either very punishing or highly rewarding. There is no middle ground.
When you start writing, ensure that it is uninterrupted by anything. Don't let the urge to correct your grammar stop you. Keep that for later. Writers have a natural tendency to create something pristine and slowly transform it into some spectacular.
Writing in quiet places helps. You need to release all the tensions and slowly wander with the thoughts in your mind. Just like a warm-up exercise before any heavy training, you need to relax and let your mind and thoughts wander. I have tried writing when something's holding up and that didn't work too well with me.
A quick session of inspiration is crucial. It can be music or watching a positive video. This can accompany you while writing. Some background music (not songs) help me write better. Like the sound of waterfall or rain. This splits your mind functions, and the focus is reinforced into writing.
To work on a book, you need to give it ample amounts of time. Your book or idea is like small, weak infant child. A newborn baby which you need to nurture every time. Then only would it become something. Every day, spend at least 10 minutes writing.
You don't need to write in chapters but rather in portions. Later, according to the context and sub-theme, chapters can be formed which is a straightforward task once your done writing.
Last but not the least, read as many books you can. And never skip reading a newspaper. This will help build your vocabulary and provide you with the essential tools to translate your thoughts into words.