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 filler episode in the anime. The Pokémon: Adventures in the Orange Islands season in general is a filler arc, mainly used to delay the beginning of the Johto saga until Pokémon Gold and Silver had been released. 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.
Infamously, the third, fourth, and fifth seasons set in the Johto region are comprised of seemingly endless amounts of filler episodes with formulaic plots based on previous episodes. 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 useless 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 a filler arc, Pokémon: Battle Frontier, which built up for the arc corresponding to Pokémon Diamond and Pearl.
The Diamond & Pearl series was often criticized for being similar to the Johto arc, due to many filler episodes taking place, with a year long gap between Ash's seventh and eighth Gym battles. However, 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. However, there are still many episodes that follow similar plots as previous episodes, which have been criticized by some.
The Best Wishes series doesn't have nearly as many filler episodes as previous series, mainly because of the speed of the series, and by focusing on character development a lot like in the Diamond & Pearl series.