This thread popped up in my Quora feed.
The answer from Andy Weir, the author of The Martian is pithy and accurate:
1) You have to actually write. Daydreaming about the book you’re going to write someday isn’t writing. It’s daydreaming. Open your word processor and start writing.
2) Resist the urge to tell friends and family your story. I know it’s hard because you want to talk about it, and they’re (sometimes) interested in hearing about it. But it satisfies your need for an audience, which diminishes your motivation to actually write it. Make a rule: The only way for anyone to ever hear about your stories is to read them.
3) This is the best time in history to self-publish. There’s no old-boy network between you and your readers. You can self-publish an ebook to major distributors (Amazon, Barnes and Noble, etc.) without any financial risk on your part.
There are some useful threads on writing in the Related Questions section below this answer, though I should warn you that Quora is a great way to get distracted from the actual task of writing your magnum opus.