Filtering insects from water:
Filtering it prior to drinking: Water which contains worms that are forbidden to be eaten, as explained in Yorah Deah chapter 84 [Halacha 1-3], is forbidden to be filtered even using a cloth, as it is impossible to drink it without filtering it being that he may swallow one of the worms.
Filtering it while drinking: see next Halacha
Summary- Water which must Halachicly be filtered from worms and the like:
Is forbidden to filter on Shabbos, unless one does so through placing a filter on the opening of his mouth and then pours the water through it, as will be explained.