"The word snail is a common name that can be used for almost all members of the molluscan class Gastropoda which have coiled shells in the adult stage. (Those snails which do not have a shell or only a very small shell are usually called slugs.)
The class Gastropoda (the snails and slugs) is second only to the insects in terms of total number of species. Snails are extraordinarily diverse, in habitat, in form, in behavior, and in anatomy, and therefore what is true of one snail species may not at all be true of another, more distantly related one.
Snails can be found in a wide range of different environments from ditches to deserts to the abyssal depths of the sea. The great majority of snail species are marine. Many others are terrestrial, and numerous kinds can be found in fresh water, and even brackish water. Many snails are herbivorous, though a few land species and many marine species are omnivores or predatory carnivores.
Although the average person might perhaps be more familiar with terrestrial snails, land snails are in the minority. Marine snails have much greater diversity, and a greater biomass. Snails which respire using a lung belong to the group Pulmonata, while those with gills form a paraphyletic group. Snails with gills form a number of taxonomic groups that are not very closely related.
Snails with lungs and with gills have diversified widely enough over geological time that surprisingly, a few species with gills can be found on land, numerous species with a lung can be found in freshwater, and a few species with a lung can be found in the sea". - From Wikipedia