How does snail breathing?

a snail has abreathing hole on the side of its body, the slugs also have the same thing