Snails in a tank are not a bad thing, they are actually beneficial. But not too many of them. And if they are in the filter, they will be in the tank unless you have a species of fish that will eat them in the tank.
The snails that arrive in the tank without you buying them are usually the small flat spirals (a type of ramshorn) and the ones called pest, pond, tadpole and bladder snails, depending on where you read it. (The latter are usually a species of physid)
The main cause of too many snails is over feeding the fish. And as I know, food can get sucked into the filter which is probably what your snails are feeding off.
The way to keep the snail population down to a sensible level is to reduce the amount of food you feed the fish, and perhaps use a snail trap. This is simply a jar with a lid, with small holes punched in the lid from the outside. The holes need to be small enough so that your smallest fish can't get through but big enough for the snails to get through. Late in the evening some food that snails find irresistable is placed in the jar, then the jar is put in the tank. The following morning, there should be lots of snails in the jar which are then removed from the tank and disposed of in your preferred manner.
The reason the holes are punched in the lid from the outside is so that spikes are pushed through to the inside surface and these stop the snais getting back out.
I would resist using a chemical to kill snails. The chemical will end up inside the fish, which isn't that good for them, and the chances are it won't kill all the snails and they'll just breed some more. Pest snails are pests because they are very hard to kill unlike the snails we buy which are very easy to kill.