first you should get the main idea of the book ( the story of which type of character, and the main events happening to him ) just an idea right, there's no need to think all the book before writtin it, cuz you would need to be over gosu or really used to writtin to be able to do it

and then you try to imagine events of less importance which take place during the story to "fill in the blanks"
of course you can also try to write it at once ( without forethinking i mean

) but as i tried writtin some different stuffs this way i've seen that, as you have a lot of imagination ( if you wanna write u have

) the story has a bad tendancy to take any directions and most of time it sucks :/ just a bunch of uncoherent ideas

my method ( which fits me at least ^^' ) is to write down the very beginning and the end, and then complete the middle with ideas that will fit the main story since i know where they aim as i've already written the end

don't get afraid tho my english sentences aren't that great i know but i don't write in english