From Bulbapedia, the community-driven Pokémon encyclopedia.
Filler episodes are used by anime and other TV shows to extend the time between the individual plot points of the major story arcs, or between the end of one major story arc and the beginning of another. A filler episode is one in which nothing happens to affect the progress of the long-term story arcs or to develop the main characters, and no returning side characters, or other significant persons (other than the main characters), appear.
Any episode during a filler arc may also sometimes be described as a filler episode. A filler arc is a storyline (often, though not always, shorter than the regular arcs) in which, over a number of episodes, an adventure is detailed that is unrelated, or tangental, to the main story arc(s); often, the filler arc adventure does not derive from the original source material. Episodes in which permanent changes or character development occur can happen during a filler arc, however.
In manga-based anime such as Naruto, fillers have been used to put distance between the anime and its source material, preventing an overlap which would cause trouble for both forms of the series. Filler episodes may follow a formulaic (and often predictable) plot, loosely based on a main episode, which will either enter the backstory of a certain aspect of a show (such as Rainbow Crystal saga of Sailor Moon's first season) or tell a completely new tale involving the main or supporting and even one-shot characters from previous episodes (such as the Bount Arc of Bleach). The Garlic Jr. saga of Dragon Ball Z, for example, revisits the events that happened in its movie Deadzone. Fillers also may introduce aspects that may complement or contradict the canon of the original source. It is not uncommon that whole story arcs comprised of filler episodes will be used within a series in order to fill an episode count and subsequently build up to a main story arc.
The Path to the Pokémon League is the first episode considered a "filler" episode in the Pokémon anime. The Pokémon: Adventures in the Orange Islands season is sometimes thought of as a filler arc. Despite this, Ash and Misty both obtain Pokémon they continue to use, though Ash's team is back to what it was at the end of Kanto when he travels to Johto. Many other important events also occur during this saga.
Infamously, the third, fourth, and fifth seasons set in the Johto region are comprised of the most "filler episodes" of any saga. The arcs also served as a way to buy time for the releases of Pokémon Ruby and Sapphire and were possibly used after the GS Ball, which was planned to consume a large portion of Johto's story, became a canceled plot device.
When the Advanced Generation series started, filler episodes were reduced due to the introduction of Pokémon Contests. As with the Kanto saga, however, Hoenn was followed by what some consider a "filler arc", Pokémon: Battle Frontier, which built up for the arc corresponding to Pokémon Diamond and Pearl. Despite some considering Pokémon: Battle Frontier a "filler arc", many important events took place within the season, similarly to Pokémon: Adventures in the Orange Islands.
The Diamond & Pearl series had less "filler" episodes than the previous two sagas, Johto League and Advanced Generation, however it is occasionally criticized for the year long gap between Ash's seventh and eighth Gym battles. It is often alternatively seen that due to the vast supporting cast featured in Sinnoh, and the focus on character development in humans and Pokémon, the episodes which are deemed "filler" are not exactly so.
The Best Wishes series has less "filler" episodes than previous series, mainly because of the speed of the series, and by focusing on character development similar to the Diamond & Pearl series. Yet another "filler season" was released towards the end of the Best Wishes series, Decolore Adventures. Unlike previous "filler seasons" this arc has much less major events due to it not having any kind League.
One can argue that there are no filler episodes in the Pokémon anime, as every main story episode is another step on Ash's journey, while every side story episode focuses on character development and showing off new Pokémon caught by recurring or supporting characters.