Big boats with spools of cable literally just sail across the ocean, dropping it as they go. As far as animals are concerned, the cable is just a rock. Things like coral will grow on them. The cables are well-armored to prevent damage. There *was* a shark attack on a cable in the 80s (probably trying to eat something sitting on top of it). Far more common is an anchor or trawling net damaging the cable.
Cables are redundant – there are always two or more on the same path so that if one is damaged there isn’t an outage of service. When damage occurs, if it is in a shallow area divers can fix it. If it is in the deep open ocean, a ship will drop a hook and pull it up to be repaired on the surface.