Part of the reason amphibians have to stay in or near bodies of water is that they have thin, water-permeable skin; if these animals ventured too far inland, they would literally dry up and die. To help keep their skin moist, amphibians are constantly secreting mucous (hence the reputation of frogs and salamanders as "slimy" creatures), and their dermis is also studded with glands that produce noxious chemicals, meant to deter predators.
(In most species, these toxins are barely noticeable, but some frogs are sufficiently poisonous to kill a full-grown human being.)