I do what I call "marinating". I walk away from my writing for a little bit and do something else. Sometimes I have to put something away for a good amount of time (weeks or months) before I know what's supposed to happen next. Sometimes I work on something else and when I come back to the original piece, it's much more clear what's supposed to happen with it. If I have a deadline and have to get the work done "now", I take a shower. I always get my best "aha" moments in the shower.