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).
“Boredom is a flight from what is important. Like workaholism and perfectionism, it is a way of distracting yourself from inner experiences. It occurs when you look outward and do not find anything to engage your attention. Instead of feeling your emotions - becoming aware of the functioning of your energy system - you become bored. Boredom ... is a flight from your higher potential. It is fear of the transformation that wants to occur, and will occur in you, when you explore your emotions. It is your resistance to spiritual growth.”
What can you do about boredom? Obviously, there are times when you are stuck. If you are listening to a lecture that you cannot leave, then you just need to find a way to get through it. When you have some control, though, use your understanding of boredom to help you out. If you can, try to do a meditation exercise to lower your arousal level. Also, keep some music handy. Music you enjoy can crowd out distractions in the environment. It can also influence your mood in positive ways to counteract the pain of being bored.  
There was also a piano, well littered with music, a sewing bag thrown down upon a cretonned window seat, and the generous fireplace was flanked by two huge baskets, one heaped with magazines, the other a perfectly round mound of yellow fur, which suddenly took form and life as a yellow tabby cat fastened hopeful topaz eyes upon them, blinked away a brief disappointment, and then yawned with ennui.