They run to the water at the first sign of trouble if they are sunning themselves on land. In the water, they are well camourflaged, as most of the body is below the surface, and only the eyes and nostrils are above water. They are large as adults. That is the main form of protection. Young crocodilians are eaten by a wide variety of animals, including big fish, herons, monitor lizards, and snakes. Because of their size they have few predators in the water. On land they are vulnerable to the big cats. That is why they run to the water when alarmed.
A hippo can kill an adult crocodile without problem, but the hippo and crocs have an understanding. A croc that doesn't get close to a baby hippo is left alone, because crocodiles cannot harm adult hippos. By being smart enough to stay away from baby hippos, crocodilians therefore stay out of trouble.