Snails and slugs are commonly known as gastropods. In course of several million years they have colonized almost on every habitat of the Earth. The gastropods had to overcome several evolutionary outcomes in all adaptations. Gastropods can live in diverse habitats as the different species survive on different modes of nutrition. The snails secrete a fluid through which they can move on all types of surfaces. The origin of the colonization of gastropods or snails to terrestrial habitats from aquatic is believed to have taken place via estuaries or semi-terrestrial habitats such as mangroves.
Some birds like Parus major carry snails in their plumage which suggests that some gastropods were transported from one habitat to another by unintentional ways.