In Chapter Four, the animals do battle with Mr Jones and his men as he attempts to recapture the farm. The animals knew that Jones would do this and have prepared accordingly: Snowball, for example, has studied a book about the military campaigns of Julius Caesar and has used this information to develop a plan of attack.
In the first stage of this attack, the pigeons and geese fly over and peck at Jones and his men, in a manoeuvre intended to "create a little disorder." Next, the goats and sheep, led by Snowball, prod and butt the men "from every side" but are quickly overpowered (as Snowball anticipated). It is at this point that Snowball calls the sound for retreat, prompting all of the animals to flee through the gateway and into the yard.
Seeing the animals retreat, the humans think that they are victorious and follow them into the yard. However, Snowball has deliberately sounded the retreat as part of his battle plans. He wanted the humans to follow because the other animals - the cows, pigs and dogs - are lying in wait and poised to attack. This unexpected ambush is a success and the animals are victorious:
And so within five minutes of their invasion, they (the humans) were in ignominious retreat by the same way they had come.
Snowball did this as a battle strategy, to trick the humans into believing the animals were retreating. When the humans rush forward, they are surrounded by the animals, and quickly defeated.