Boredom usually sets in when you are engaging in an activity that is not sparking the imagination. This means boredom can set in when doing nothing, when doing a routine action that has become rote, or even when doing something that important that holds no interest for you, such as taking a test in school. The best way to combat boredom, therefore, is to turn your attention toward an activity that fires up the brain and maintains the interest.
Entropy is the friend of boredom. You need to get the blood coursing through the body and to the brain rather than just remaining sedentary and cursing the fact that there's nothing interesting to do. Exercise also releases chemicals in the body that actually make you feel better. Creativity can be spurred by this sudden onslaught of energy and good feelings, and it can get your brain working in a way that will lead you to find something interesting to do rather than waiting for it to occur.
To work at its best, the brain needs to be challenged. When you are young, this firing of the synapses occurs naturally every time you learn something new. By your teenage years, however, the brain becomes less of a SpongeBob and more of a Squidward. You need to work at getting your brain interested in new things. Pick up a book of brain-teasing puzzles that challenge your perception. Even playing a particularly difficult video game can get your brain excited to beat back boredom. Crossword puzzles, board games and memory games are all ways to beat boredom by getting the brain working.
If you find that you are bored consistently at home and work and play, then it might be time to take it as a signal for change. The cure for this kind of boredom is more complex than the cure for occasional boredom. Being bored with most of the aspects of your life requires that you re-examine where you are, where you thought you'd be, and where you want to go. Maybe you are tired of your job and need a career change. Maybe you are tired of where you live and need to seriously give thought to just packing up and moving to a completely different environment. The most difficult aspect to consider is that your social life is causing your boredom. Your boredom may be cured by breaking up with a lover or simply finding a lover. As painful as it may be, some people who find a cure for boredom in the form of divorce.