You know how some animals will take dust or mud baths?
Some birds do that, too, just with ants.
The behavior is called "anting," and, according to Wikipedia, there are two different types of anting:
The bird may pick up the insects in its bill and rub them on the body (active anting), or the bird may lie in an area of high density of the insects and perform dust bathing-like movements (passive anting).