These authors suggest that attention plays an important role in creating boredom. In particular, there are a few conditions that need to be met for people to feel bored. First, people need to have a reasonable level of psychological energy or arousal to feel bored. When people have low arousal and there is not much happening in the world, then they often feel relaxed. When they have high arousal, though, they have energy they would like to devote to something, but they cannot find anything engaging.
In Experience Without Qualities: Boredom and Modernity, Elizabeth Goodstein traces the modern discourse on boredom through literary, philosophical, and sociological texts to find that as "a discursively articulated phenomenon...boredom is at once objective and subjective, emotion and intellectualization—not just a response to the modern world but also a historically constituted strategy for coping with its discontents."[3] In both conceptions, boredom has to do fundamentally with an experience of time and problems of meaning.

“I don’t like to be bored, but without it I couldn’t escape from it. Creativity is the byproduct of escapism.⁣⁣ Inventiveness is the byproduct of laziness.⁣⁣ Productivity is the byproduct of your mom.⁣⁣ Lol. Anyways. ⁣⁣The bored do weird stuff to not be bored.⁣⁣ The lazy invent things like cars so they don’t have to ride horses. ⁣⁣Get bored to get busy.”

Second, boredom typically occurs when people have trouble focusing their attention and they believe the reason for this difficulty is in the environment. When sitting in the airport, for example, there is probably a lot going on. There are people having conversations that you could listen to. You probably have something to read. There may be televisions showing the news. But, the stress of waiting for a delayed flight often makes it hard to concentrate, and so your mind jumps from one thing to another. You assume that this is caused by the environment, and so you feel boredom.
Boredom is similar to mental fatigue and is caused by repetition and lack of interest in the details of our tasks (such as tasks that require continuous attention, waiting at the airport, prisoners locked in cells). Any experience that is predictable and repetitive becomes boring. In general, too much of the same thing and too little stimulation can cause in its victim an absence of desire and a feeling of entrapment (Toohey, 2012).    

^ Vodanovich, Stephen J. (November 2003) "Psychometric Measures of Boredom: A Review of the Literature" The Journal of Psychology. 137:6 p. 569 "Indeed, a shortcoming of the boredom literature is the absence of a coherent, universally accepted definition. The lack of an agreed-upon definition of boredom has limited the measurement of the construct and partly accounts for the existence of diverse approaches to assessing various subsets of boredom."
There are three types of boredom, all of which involve problems of engagement of attention. These include times when we are prevented from engaging in wanted activity, when we are forced to engage in unwanted activity, or when we are simply unable for some other reason to maintain engagement in an activity.[13] Boredom proneness is a tendency to experience boredom of all types. This is typically assessed by the Boredom Proneness Scale.[14] Recent research has found that boredom proneness is clearly and consistently associated with failures of attention.[15] Boredom and its proneness are both theoretically and empirically linked to depression and similar symptoms.[16][17][18] Nonetheless, boredom proneness has been found to be as strongly correlated with attentional lapses as with depression.[16] Although boredom is often viewed as a trivial and mild irritant, proneness to boredom has been linked to a very diverse range of possible psychological, physical, educational, and social problems.[19]
“Time is quixotic because it can torment us. When we have insufficient stimulus to fill our lives, we resent the relentless quality of time, and we engage in activities designed to “kill time.” Time that passes slowly creates insufferable boredom; time that passes to quickly makes us aware of our accelerated death march. A person’s perspective on time depends mostly on what they are most afraid of, boredom or death.”
The most common way to define boredom in Western culture is having nothing to do. Boredom is generally viewed as an unpleasant emotional state in which the individual feels a pervasive lack of interest in and difficulty concentrating on the current activity. The condition corresponds more precisely to the French ennui, an existential perception of life’s futility. Ennui is a consequence of unfulfilled aspirations (Goodstein, 2005).