In an ideal world, once a writer begins a project, the outside would go away, and he or she would be left with just a computer and their imagination. Life doesn't work that way. There are possibly a spouse and kids around. And even if there aren't any other people in the house, there is always the dreaded telephone and the continuous email alerts that pop up on your screen while writing.
So what's a writer to do? Ignore it all! If the phone rings, don't answer it. If you have children in school, you may want to monitor the calls. That's what caller ID is for. Only take calls from your children or their school. The same goes for the spouse. Let him/her know that while you are writing, you will only answer if it is an emergency. In other words, don't call unless it involves blood.
Let friends and family know your routine. If you write in the mornings/afternoons/evenings, ask them not to call you then. Or tell them to leave a message because you probably won't pick up. You are WORKING! You would never think to call a friend at work and start chatting about the upcoming bake sale. So ask them to respect your work ethic.
If all else fails, unplug the phone or turn off your cell phone. While this is not recommended when you have children, or for long stretches of time, it can give you an hour of two of peace. This includes turning off the email alerts also. Even if you don't intend to answer them, just having them pop up at the bottom of your screen, daring you to read it, is a distraction.