Right now you're probably supposed to be doing something else. It could be prepping a document for work, it could be housework, it could be working out. The fact is that reading this is distracting you from doing something else. Unfortunately distractions are a part of life. Before we go on though, there is a difference and a distraction and unavoidable life/work events. Life/work events come up from time to time that need to be taken care of immediately. For instance, I normally have this blog post written by 12 noon. It's 4:30 right now and I'm just sitting down to write this. GHB (my son) had an allergic reaction to some bug bites and we had to take a quick trip to the doctor. He's ok. The trip to the doctor wasn't a distraction, it was unavoidable.
On the other hand distractions are completely avoidable. As a matter of fact, you usually choose distractions to avoid doing something else. I would never choose a trip to pediatrician with 2 year old. I would choose my Facebook feed over bookkeeping. I take the time to point out the difference because I've known plenty of people who confuse distractions with unavoidable events all the time. As a general rule of thumb, if you find yourself in the middle of the same unavoidable events/situations then they are most likely distractions.
Now that's out of the way, let's talk about avoiding distractions.
Deadlines: if your TPS report is due in 2 hours and it usually takes you 3, you probably don't have Minesweeper open on your desktop. You might have to be over the age of 35 to get those references. The point is having a deadline forces you to bare down and do what you need to do.
Environment: I normally write and do most of my work that isn't with clients in Starbucks. My wife thinks this is weird since I don't drink coffee. I like to go to Starbucks because it's not home. At home there is a TV and a kitchen and a bed and a couch. All Starbucks has to offer is amazing WiFi and a beverage I want no part of. The physical space you're in can/will effect your production.
Schedule: this kind of goes with deadlines but it's a little different. If you know you have tasks that have to get done then allot an appropriate time for each task. By appropriate I don't just mean "this will take an hour so I'm going to give it an hour." It may take an hour but if you want to claw your eyes out after 20 minutes, it may be more appropriate to allot 15 minutes and then go to one of your other tasks for a little bit and then come back. This is better than being on task for 20 minutes and then wasting 30 minutes on something non-productive.
Allow the distractions: I do KenKen puzzles everyday. It's stupid, I know, but if I don't do them they sit in the back of my mind and keep reminding me that I haven't done them. The easiest way for me to prevent this is to just do the stupid puzzles. So I make them the first thing I do when I start to do work. I allow myself to waste 10 minutes to prevent hours of wasting energy trying to not think about KenKen. If you know you have something that's just gonna nag you then just get it out of the way.
These are just a few techniques you can use to avoid distractions. Having a plan is going to be your best bet to avoid distractions. Try some of these out and get back to work.