It is due to low pH water or soft water. Shells (made of calcium carbonate) are covered by a thin proteínic film called periostracum. Once it is slightly damaged or even without such damage, acidic water slowly dissolves the shell and produces the whitish pits, which progress, makes the shell thin and fragile. Once pitted, bacterial action speeds up the process. The snail does not really suffer, but it does become more prone to predation or physical damage.
No need to do anything, unless harder water is desired (possibly not, depending on what type of fish you keep). If so, any carbonate material added to the tank (crushed shells, marble, limestone) would slow the process or prevent it. I wouldn’t worry.