For about as long as I've been committed to writing, I've been devouring tips I can find online from other writers for tricks on how to stay motivated and avoid the dreaded "creative block".
After years of pouring through search results, Pinterest boards, and Tumblr blogs, I've come to the ultimate conclusion that there is not one "true" way to stay motivated in writing. Not only are tricks to stay inspired completely preferential, it's simply not possible to be driven and encouraged one hundred percent of the time. Sadly, dry spells are merely a part of the process, and ultimately will be what makes or breaks being a writer for you.
But while there are no short cuts to true inspiration, there are still tons of ways to keep yourself writing until you've hit that vein of muse again.
Word sprints have been a favorite of mine ever since I started up National Novel Writing Month again, but it doesn't have to be November for you to utilize this tool. If you're finding yourself sitting in front of your computer monitor, constantly distracted by things in your environment or the alluring pull of the Internet, give yourself a challenge. Set a timer for ten or fifteen minutes, and plug away at your text editor until the time is up. Even if you're not writing a lot in that time - or spending the bulk of the sprint staring blankly at your screen - any progress you make in that time chunk is still progress. No matter what pace you find yourself working at, accumulate enough word sprints, and you'll find you've hit your goal.
Leave it unfinished
This is more of a habit than a method. Whether it's a novel, short story, or screenplay, whenever I've reached the end of a writing session - any time I have to walk away from my computer, or pick up the project at another time - I don't finish my train of thought. Whatever description or line of dialogue I was about to type up is left unfinished. For me, starting always used to be the hardest part of writing - just picking up wherever it was I'd left off. Leaving myself an unfinished thought to come back to for my next writing session forces me to go back and read the last segment I wrote and engage with the same vein of thoughts that led me to that stopping point. That way I can pick up where I left off and move on seamlessly.
Use writing prompts
It's fairly obvious, but writing prompts have always been invaluable to me when I'm really stuck in a rut. Sometimes it can feel a lot like writing filler, but remember that you can always fix it if it's "crap". You can't fix a blank page. Some of my favorite resources for prompts include Writeworld's "creative blocks" or the "dare machine" widget on the Young Writer's Program webpage.
If you've been feeling stuck for a while, you should probably listen to what that feeling is telling you. It could be that the reason why you're having so much trouble moving forward is because you didn't do enough planning ahead before you began writing. Pre-writing is an invaluable tool to a writer, but it's never too late to get started! Google and Wikipedia are your best friends. Chances are there are settings, people, or situations in your writing that you haven't experienced first-hand, and if that's the case, look it up! You don't have to be an expert on the subject, or even well-versed, you just have to become familiar. Research can even include browsing Google Images or Deviantart for illustrations, photographs, and other art to give you an idea for the mood, tone, setting, or character likenesses in your project.
And, if all else fails...
It may seem counterproductive, but the fact is that everyone procrastinates from time to time, no matter how dedicated or passionate you are. The key to getting anything done is to procrastinate successfully. If reaching that goal just isn't happening today, don't be afraid to give yourself permission to take up other activities, but not to become completely unfocused. Ask yourself, is this useful? Build a playlist of songs that fit the tone of your project. Clean up the clutter in your writing space. Go for a walk, or take a trip someplace you haven't yet been. Best of all, talk it out if you can. Grab a friend and chat about what's got you stuck, and get some perspective.
Ultimately, while you cannot ever be "rid" of writer's block, you can work with it. While these tips might not be the perfect fit for you, if you keep searching, you're guaranteed to stumble across something that better fits your style, and with enough practice, these tools will become habits.