Elephants communicate danger or threats to other members of their herd through various vocalizations such as trumpeting, rumbling, and roaring. They also use body language like raising their trunks, flapping their ears, or stamping their feet to signal potential danger. Additionally, elephants are known to use infrasound, which is low-frequency sound that can travel long distances, to communicate warning signals to other elephants in the area.