Don't Be A Giver-Upper
When you've written pages and pages, chapters and chapters, and you're maybe even almost done with your wonderful story...then you get stuck.
What do you do?
The most important thing is to not worry. Push the writing aside and take a break. Listen to music. Do something relaxing. Then after a couple of hours, go back to it and read it. Out loud. If you're still stuck then just leave it alone for another day.
If after that, you are STILL stuck and have NO idea whatsoever on how to continue your writing, then take it away and don't touch it for a week. Or longer. Then, maybe 5 months later, you'll have a sudden inspiration. that's when you can rush to your laptop and continue.
So don't give up. If you really really seriously cant continue even after months and months and months then maybe that story isn't the right kind for you. Start something else. It'll be all right. Just DON'T panic and you must NEVER tell yourself, "i'm a horrible writer. I'm stuck."
Happy Writing! I hope my tip helped.