It is easy to get distracted when you are trying to write. You know you are supposed to sit down every day and write to expand your story or work on revisions, but there are always things to distract you. It could be the children knocking at the door, the birds flying outside, or even your mind wandering. It could be caused by writer's block, boredom or spring fever.
No matter what the cause you need to work through it. You have to overcome the distractions to be able to continue on with your writing. If the children are knocking at the door then set up a time when they know they are supposed to bother you, time that you set aside just for writing. If something outside is distracting you because you sit in front of a window (I do) then get blinds for the window or move your office. As for your mind wandering that is something that you have to work through on your own. All of us at times deal with day dreaming and it can be productive, but it can also be counter-productive and it is up to you how you handle it.
When you are dealing with writer's block it can be extremely frustrating. It can be caused by you are overtired, your emotions are running high or you could just be pulling a blank, whatever the cause there are different techniques talked about around the Internet that can help you and other authors might be able to give you some ideas that have worked for them. I know when I get writer's block about a specific book, I switch books and try something different. As for the boredom aspect, you can try the same thing, work on something new or try a different genre to see if that peaks your interest. As for spring fever, take a day off, go play in the sun and have some fun, then the next day get back to work.
There are many things that can distract us and it is up to us what we let distract us and what we don't. If you want to be a successful writer then you have to find ways around the distractions in your life and not give in to the impulses that cross your path.
As always, happy writing