Everyone has their little tips on what works and what doesn't when it comes to finishing a book. What do most of them agree on, though? Write! Sit down, put in the time, and pound away at the keyboard until you reach the end.
What else? Edit! You must, must, MUST! edit the living crap out of your book. Especially if you're a pre-published author. Go beyond spell check, too. Print it up or at least view it as an un-editable PDF. Why? I found that when I can't actually fix something, my subconscious is paying better attention to what's on the page than when I'm reading it in a .doc (or OSX pages) file. This may not work for you, but it works for me. But find out what DOES work for you, and make sure a red pen has marked up at least one in three pages.
Then give it to a friend. Didn't find anything after you got it back from your friend? Did they find anything? No? Then they're lying to you. And/or you're lying to yourself. Find any published book on the bookshelf in your room. I guarantee you there's at least three typos in any one of those books. I found one on the second page of the THIRTEENTH book in a bestselling series! If an entire team of professional editors can miss at least one typo, all of us are doomed to do the same. Myself included!
So writing, editing, what else? Support group! You're going to feel like giving up. It will happen eventually. And if you're really lucky and that never happens, then I take credit for inspiring you, and I'd like that favor repaid, please. (Just kidding. I don't take credit for anyone's success but my own.) It could happen. Some people go into writing blindly, unaware of how difficult it is, and they reap substantial success out of shear talent! And if you're NOT one of those people, then hearing those stories (and struggling to become one of the successful writers) WILL MAKE YOU WANT TO QUIT!
So get friends who understand where you're coming from. Don't vent (too often), but support each other. Edit each others' work, celebrate when one of you "makes it," and find a way to enjoy the process when you're REALLY DEPRESSED!
The secret? There is no secret. It's well-known. Sit down, finish that book. NEVER give up no matter how many people tell you to. Edit it until your eyes bleed, then edit it some more. All the while, surround yourself with people who are going through the same thing because otherwise you'll face this journey alone. And that's no fun.