Cattle egrets and elephants have a symbiotic relationship that is an example of mutualism. The two species benefit from each other's actions in the following ways:
Food
When elephants move through grasslands or forests, they stir up insects and other small organisms from the vegetation. Cattle egrets then take advantage of this by foraging in the disturbed areas and feeding on the insects.
Cleaning
As cattle egrets forage around elephants, they pick off insects and parasites from the elephants' skin, which helps to reduce irritation from pests.
Early warning
Cattle egrets can also serve as an early warning system for elephants, alerting them to potential threats or predators in the area.
Free ride
Cattle egrets can also perch atop elephants and take advantage of the insects that the elephant's feet stir up while walking.
Ian