As incredibly bizarre as this may sound, I find acting things out really helps when I get stuck.
This helps in a couple ways:
1) It gives me a firmer mental image of what it is I'm thinking about. It also (usually) helps me figure out if what I'm thinking is complete hogwash.
2) It helps make the dialogue smoother. If the dialogue you're thinking about sounds odd, you'll generally notice as soon as you speak it. Plus, it helps fill in the gaps in dialogue by attempting to create a natural flow to the 'conversation'.
3) It generally helps smooth out kinks.
... It sounds absolutely loony, but I'd swear by it.
I also find that stopping if you're stuck, taking a break and coming back later helps a great deal. Though don't let yourself get distracted by the internets (or before you know it, it'll be 2am and you'll have absolutely nothing done
).
I've also found that writing something completely nonsensical or unrelated really helps get things going. Try writing a letter as a character, or a drabble, or participating in one of the numerous challenge contests that are out there.
Prompts can really get you exploring creative ideas that you might not have even considered otherwise. Plus they're loads of fun! Sometimes things like that can really get your creative juices going. It's oftentimes (for me anyway) easier to write once you've got started.
You can also try just writing a very rough draft (no editing, and very little back-spacing, much like
NaNoWriMo). Set yourself a word count, or time limit, and just write a little bit each day (doesn't matter if it's not your best work). Once you've got it all out on paper, you can go back and clean it up, and turn it into something presentable. This has the added benefit of allowing you to look at the story as a whole before you post it, so you won't wind up accidentally painting yourself into a corner.
Hopefully there's something here that you'll find useful! Not everything works for everyone, but writing, like most things, is a skill, so the more you do it, the better you'll get. So if all else fails: just keep going! Every time you write, you get a little bit more experience, and believe me, it adds up!
Good luck.