Ennui is a feeling of sad, dull boredom that you get when life itself seems boring or pointless. Ennui usually lasts for a long time: it's not something you feel for just a moment or just a day.
The word "ennui" comes from a French word that means "annoyance." When your entire life is annoying you because it's all the same, day after day, with no happiness and no excitement, then you might be suffering from ennui.
Ennui is different from the kind of temporary boredom that we all experience now and then. If you're waiting in line one day with nothing to do, you're experiencing boredom. If you're taking a long car ride and you have nothing new to play with, you're experiencing boredom. But if you're going to the same kind of party that you've gone to fifty times before, and you're feeling sad and dull, as if the party means nothing to you and brings you no joy? You're experiencing ennui.
Just like ennui is different from boredom, it's also different from depression. Depression is a mood disorder: your doctor can help you know if you have it and help you make it better. But ennui is not a disorder. It's a feeling, or an attitude toward life.