After the grain was ground into flour, it was sifted to remove any kernels that might not have been sufficiently pulverized. The melacha of merakeid involves passing something through a sifter of some kind to remove an undesirable element.
A practical example of merakeid: some people keep a few grains of rice in their salt shakers to absorb moisture. Shaking salt from such a shaker is prohibited on Shabbos as the salt passes through freely but the larger rice is trapped behind. This is the exact definition of merakeid.
Another practical application of this melacha: drawing a tea bag from a cup of tea allows the water to drain out of the bag, while the tea leaves are trapped inside. This is a violation of merakeid. Rather, the bag should be drawn out with a spoon so that the liquid is not strained from the bag.
Filtering water is permitted if the water is already drinkable anyway, but not if it renders the water fit to drink. Accordingly, most of our filtration is permitted as it merely enhances already-drinkable water. There is a question as to whether or not New York City tap water requires filtering to remove tiny crustaceans called copepods. Pursuant to that, there is a question as to the permissibility of doing so on Shabbos. Such is far beyond our scope to address; consult your local poseik if you require guidance in this area.
This is just an introduction to the concepts of the melacha of merakeid; it is not a substitute for a full study of the halachos.