If you're busy writing something and are really into it. Stay in the room. It's one of the hardest things to do, and we all suffer from distractions. However, don't be tempted to stand up and walk around. Fight the urge.
1.) Turn off your computer.
Yes, that's what I said. Turn it off. If you're not using it as your rough draft, there's no need for it. You can spell check and do all that other stuff after you're finished.
2.) Don't you dare touch that vacuum!
If you're in the middle of writing, don't be tempted to do some cleaning house in thoughts that it would help you with the writing process. There's a 90% chance that it's not. It's just better to stay where you are and haul it out until you're left with no ideas.
3.) "But I've been writing all day!"
That's great! Keep going. If you have so many ideas, keep it flowing Everyone hates it when they think of something, go do something else, then forget what they were thinking of. Don't let it be a lost cause. Sometimes, you can only think of something so perfect for a piece of writing once before it's gone.