There's no foolproof way, of course, but one thing that helps me is to pick three random words, sentences, or even memories and write about them. For example, I could pick the words kettle, glove, and sword, and i'd have to write a story involving all of them. Also, forcing yourself to just write and not edit is very helpful. I used to know of a website very helpful for that, but I've sadly lost it. If I ever find it again, I'll be sure to let you know. :)