Only in the last decade has there been much scientific research looking into the nature of boredom. In 2006, a study classified boredom into four different types, with a follow-up study published this month in the journal Motivation and Emotion adding a fifth kind of boredom, called apathetic boredom, to the list. The researchers involved in the study had 63 university students and 80 high school students answer smartphone-based surveys about their activities and experiences over the course of two weeks.

One more key element of boredom is control. Boredom often occurs when you have little control over your situation. Waiting rooms, lectures, and airline gates are all places where you have little control over your situation. Normally, we react to unpleasant situations by changing the situation. If you don’t like a book you are reading, for example, you close it and do something else. Boredom happens when you are unable to change the situation.  
In a learning environment, a common cause of boredom is lack of understanding; for instance, if one is not following or connecting to the material in a class or lecture, it will usually seem boring. However, the opposite can also be true; something that is too easily understood, simple or transparent, can also be boring. Boredom is often inversely related to learning, and in school it may be a sign that a student is not challenged enough, or too challenged. An activity that is predictable to the students is likely to bore them.[31]
The French loanword ennui comes from the very same Late Latin word that gave us annoy — inodiare ("to make loathsome"). We borrowed ennui several centuries after absorbing annoy into the language. Ennui deals more with boredom than irritation - and a somewhat specific sort of boredom at that. It generally refers to the feeling of jadedness that can result from living a life of too much ease. The poet Charles Lloyd described it well in his 1823 Stanzas to Ennui when he referred to that world-weary sensation as a "soul-destroying fiend" which visits with its "pale unrest / The chambers of the human breast / Where too much happiness hath fixed its home."