If attention is really such a crucial talent, the inevitable question is whether the degree to which one possesses this talent is genetic or whether it can be modified through practice. The answer is that automatic attention is an inborn reflex (genetically determined), but selective attention is a learnable response. This means that you have acquired whatever talent you have for attending to weak stimuli and you can improve that talent with practice.
As you probably know, young children have a very short "attention span." In the normal course of growing up, we all learned to sustain attention to activities we found interesting. As with every other trait, we undoubtedly differ to some extent in our endowed capacity for developing attention skills, but we probably differ more because of our learning experiences. Parents and teachers who patiently retrieved our attention when it started to wander helped us learn to keep our attention focused on the topic at hand. Although there is no proof of this assertion, it is a tenable hypothesis for our purposes. It implies that a major aspect of learning to "pay attention" is learning to recognize when attention has wandered.
Two contrasting practical examples may be helpful. One is a Deacon standing in the rear of a church with a long mallet that s/he uses to tap the head of anyone who starts to doze off during the sermon. The other is the child equipped with a buzzer that sounds an alarm when s/he starts to wet the bed. Both examples show the use of ``feedback'' to alert the person about inappropriate behavior. What happens is that, with practice, the person learns to anticipate when inappropriate behavior is about to occur and takes corrective action.
You have neither a person nor a device to monitor your behavior and alert you when your attention wanders. Hence, the best you can do is start a diary in which to keep a record of your slips. At first you won't be aware of your attention starting to drift from a textbook, but you do become aware at some later time that you have not been concentrating on the text material. Whenever that happens, make a note in your diary of when and where it happened, what you were supposed to be studying, and about how long it seems that you were thinking about something else (or your mind was blank). Your diary can be just a separate sheet of paper, but it becomes your record of lapses of attention.
With practice, you will recognize when your attention is starting to wane, so you can, like the tired driver catching himself starting to doze, snap yourself back to your studies. The tired-driver analogy is a good one to remember. Good drivers know that, if they have difficulty staying alert, they should pull off the road and rest a while. So too, a good student knows that, if s/he is having more-than-usual difficulty maintaining concentration on studies, s/he should take a break and let the mind rest. Having a diary enables you to recognize not only when your attention is straying off course, but also when you are below par. In general, a shorter amount of time in efficient study is more productive in the long run than a longer time of tortured study.