How do you do it? Is it God? Does he give you authoring powers? If so, I may return to christianityism.
While I want give credit to my Lord and Savior Jesus Christ in all things and thank God for the breath in my lungs, I think it mostly has to do with outlining and knowing my story arc.
I think Shakespeare when it comes to writing a novel.
Act One:
Introductions all around. Who are the characters? What is the minor and major conflict? Where is the story taking place?
Act Two:
The conflict comes to the surface. Characters are forced to act. Lines are drawn. Plans are made. Somebody probably dies.
Act Three:
A failed attempt to resolve the conflict. Or, better, minor conflict is resolved only to show that it wasn't the major conflict.
Act Four:
Major conflict confronted. Characters have a near death experience or sacrifice something big to make it out alive.
Act Five:
Resolution. Who's left alive? What bad guys made it out? What will they have to do in order to survive the next conflict?
When writing a trilogy, each novel has an arc that fits into the overall story arc that follows the same five act formula.
Then I write out a three sentence summary of each chapter before I write the real book. That way I know where I'm headed before I really write.
And that's about it.
Also, never let your characters "rest at the inn and they slept really well."
Give them conflict! Their bags are stolen. The main bad guy is in the next room. The inn burns down.
I dunno. Just have fun!