There are good reasons why you find that own mind often defeats your best efforts to get focussed on a job, and stay on it.  There are two sides to controlling your attention. One is the very conscious decision to rest your gaze on a particular task – something that you consider to be important right now. The other is keeping all other distractions and competing targets for attention out of the way, to create space to focus on what you want. Your brain is doing its job in trying to bring these other possibilities into your awareness and attention – it is not a fault!
There are a several factors that can affect your ability to suppress these would-be distractions. Tiredness,  and state of mind for example. Maybe you have a stressful situation at work, with your family, home or relationships, or money worries. Your health, both physical and mental have a large bearing, as does your own tendency to suffer from fear of missing out.  It could be that you are simply not stimulated by the task and so you might easily get bored and welcome distractions. All of these are going to make other tasks more attractive to your attention, and more likely to kick your current job out of the spotlight.

If you can get a few blocks of 20-40 minutes of focus, punctuated by other stuff, you are doing pretty well

While the factors above are not possible to control in the moment, There are entirely controllable elements that you can use to increase your readiness to focus. There is your physical environment – you can remove clutter and things that you know typically attract your attention (examples – desk clutter, the cat). Make sure you are reasonably comfortable, warm (or cool – depending on your particular climate). Your digital environment provides untold opportunities for distractions. Close tabs, close applications, and just have open the one or two apps you need for the job. Disable notifications for anything that runs in the background that’s likely to pop-up or ping.
Then there are all those itches that you know you like to scratch – the distractions that we go looking for when boredom with the current task grows, or when it begins to get difficult. Things like snacking, going to the toilet, checking your phone. Take care of these things if you can, before you begin. The aim is to eliminate the power they have over you, for a while at least. You don’t have to see to them all, you can make a promise to yourself about when you will, to keep them quiet. Make a deal with yourself about the time you will spend staying focussed. Give yourself twenty minutes after which you promise yourself to indulge one or more of your itches – like a binge on social feeds, or a quick snack/coffee.
OK, almost ready start. Check your phone again if you must and now put it on silent, and out of arm’s reach, face down. No cheating.
While you are working you may find that ideas, entirely unrelated to what you are thinking, occur to you. There is a danger that these potentially useful or important (but possibly useless) thoughts can loop around, eating into the quality of your attention. They occupy part of your working memory, and become just another task competing for attention.
Keep a piece of scrap paper and pen next to you – not your phone or tablet – it’s just not the same! When one of these thoughts pops into your head, just scribble one or two words as a reminder to mentally offload of that thought, and then you immediately get back to the task at hand. You know that the thought is safely captured, and your brain can relax about it. 

 

Once your focus time is up, you can look at your note and take any action you need to. This is also the time to let your attention run around all those things you have denied it for a while. It is important that you do this, to train your mind that it can trust your 20 minute deals, and that 20 minutes is not so very long after all. If on the other hand you cave in and check every three minutes during your ‘focus’ time, your mind will learn that that is the real deal, and the 20 minute target is something to be ignored. Your focus will suffer.
Sometimes a strange thing happens. At the end of your 20 minutes you are so enjoying the progress you are making so much that, on balance, your whole brain is happy to back off and let you have a little longer on it!
It is normal to get distracted. It’s just how your mind works. So if you can get a few blocks of 20-40 minutes of focus, punctuated by indulging some distracting but inevitable other stuff in between, you are doing pretty well.
Being at peace with your brain is not so much about beating it into submission, or feeling bad about your lack of achievement, but understanding and rolling with its bad habits.  Being aware of your brain’s needs and habits allows you to manage them, tilting its behaviour ever so slightly in favour of the things you really want to apply your mind to.
Pomodoro Technique

A lot of the ideas here accord with the Pomodor Technique, a simple but effective method of managing your time and attention. Learn more about this.

To learn more about attention and play a game to illustrate just how slippery it can be, take a look at the full article.

See the full Attention Article

A full discussion of attention, illustrated by an interactive game to help you think about how it works

Play Games

Each Game level introduces a new idea about attention