I am infinitely distractable, particularly when I am doing something that hasn’t captured my imagination. A recent move to a new cube in a more-trafficked area has led my concentration level to decline even further.
I believe that concentration can be learned. I did some research, and here are some ways to improve concentration:
Single Task. I’ve been pretty sure about the harm of multi-tasking for some time (Simple Multitasking = 30% Late), but this is one more reason. When you are trying to do multiple things at once, your attention is automatically fragmented, and you will not be able to concentrate on one to the exclusion of the other (otherwise it would be time-slicing, not multi-tasking).
Change Tasks. If your lack of focus is coming from a long stretch of the same activity, change it up. Varying what you can do can refresh your mind. 
Do Five More. I am a proponent of using a timer to get things started, but this one takes another look on it. “Before I take a break, I need to [insert your five things here]”. For example, write five lines of code, pull up five more weeds, practice five more minutes. 
Get Rid of Preoccupations. Chances are the thing your are worrying about is something beyond your control. Get rid of the worries and it will be easier to concentrate. 
Take Breaks. While this seems like the antithesis to concentration, in long haul tasks it is better to take a break than fight through fatigue. .
how to improve concentration