Following Old Major’s death and a few months of preparations for the rebellion, the time actually comes a lot sooner than any of the animals had expected. As Mr. Jones’s drinking problem became worse and worse, he starts forgetting to feed the animals. The animals break into the shed to help themselves to food. When Mr. Jones realizes what has happened, he goes into a frenzy. He and his men arm themselves with whips, intending to hurt the animals.
In retaliation, the animals attack, ultimately forcing Jones and his men to flee the farm. After the men and Mrs. Jones are off the property, celebrations begin. The first job undertaken is to destroy everything that Jones had ever used to oppress them, from whips, bridles and reins to halters and decorative ribbons.
One of the decisions made in the immediate aftermath of the rebellion is that the farmhouse will be a museum, rather than a place for any of the animals to live. Showcasing their new literacy skills, the pigs rewrite the “Manor Farm” sign to read “Animal Farm”, signaling the magnitude of the change that they allege the rebellion will bring to all the animals. In addition to this, the pigs announce that there are seven basic commandments by which the animals must live from now onward.
To answer this question take a look at Chapter Two. According to the narrator, the Rebellion "was achieved much earlier and more easily than anyone had expected." One Saturday evening, Mr. Jones goes out and gets so drunk that he forgets to feed the animals. Overcome by hunger, they break into the grain store and easily overcome Mr. Jones and his farmhands who, in response, flee the farm.
The animals are then left in complete control of the farm. They cannot believe their "good fortune" and how easy it was to expel all humans from the farm. Now the real work of the Rebellion can happen, beginning with the Seven Commandments, the framework through which the animals turn Old Major's vision (from his speech in Chapter One) into a reality. Specifically, the animals proclaim all humans to be enemies and all animals to be friends.
The expulsion of the humans and the creation of the Seven Commandments means that the Rebellion has taken place both physically and ideologically.
The idea of rebellion is planted by Old Major, who is at the end of his life; he has a vision of a farm owned by Animals, who work together for the common good. His ideas are taken and expanded by the pigs, led by Snowball and Napoleon; Snowball is an idealist, while Napoleon seeks personal power. When Jones forgets to feed the animals, they rebel and drive all the humans off the farm, and believe themselves to be on the verge of a better future. The animals change the name of the farm from Manor Farm to Animal Farm, but this change is not accepted by the public until the Battle of the Cowshed, where the animals prove that they are capable of defending their property.
...human beings did not hate Animal Farm any less now that it was prospering... against their will, they had developed a certain respect for the efficiency with which the animals were managing their own affairs. One symptom of this was that they had begun to call Animal Farm by its proper name and ceased to pretend that it was called the Manor Farm.
(Orwell, Animal Farm, msxnet.org)
After that, although the humans make a few attempts to discourage the farm's success, the farm moves from its equality-based Utopian ideals to a slave plantation under the rule of Napoleon, and the rebellion is all-but forgotten, with only the memories -- many invented by Squealer -- of Napoleon's glorious victory over humanity to remember the rebellion by.
The animals gather at night to talk and dream of a rebellion against Farmer Jones, but when the revolt comes, it is unplanned. It is a response to the straw that broke the camel's back, meaning that the animals finally get fed up and rebel.
The background is as follows. Farmer Jones develops a drinking problem after losing a lawsuit. Both he and his men neglect the farm and the animals. One Midsummer's Eve, Farmer Jones goes and gets drunk at the Red Lion. Instead of caring for the animals, he comes home and falls asleep. The animals go so long without being fed and get so hungry that they break into the grain stores. At this moment, Farmer Jones wakes up. He and his men go after the animals, trying to drive them away from the grain with whips. Finally, the animals simply can't take the abuse anymore.
This was more than the hungry animals could bear. With one accord, though nothing of the kind had been planned beforehand, they flung themselves upon their tormentors. Jones and his men suddenly found themselves being butted and kicked from all sides. The situation was quite out of their control. They had never seen animals behave like this before, and this sudden uprising of creatures whom they were used to thrashing and maltreating just as they chose, frightened them almost out of their wits. After only a moment or two they gave up trying to defend themselves and took to their heels.
This is not so very different from the way the Russian Revolution actually unfolded in 1917. We see that part of the success of the revolt comes from how surprised the humans are that the animals would dare to rebel.
There are two ways to answer this question.
First, Old Major in chapter one tells the animals of their lot. In light of this, the only logical conclusion is to revolt. This is also the chapter when the words of Beasts of England is given. Therefore, from this perspective, the thought of revolution is in the air. This sets the stage.
Second, in chapter two life on the farm becomes more difficult. Mr. Jones begins to drink. He loses a lawsuit and this depresses him. His men do not care for the farm, and at one point they forget to feed the animals. In addition they begin to whip the animals for no good reason. When his happens the animals cannot take the oppression any longer. Therefore, they begin the revolution. From this perspective, we can say that the revolution is only a matter of time in view of the situation on the farm.
At the beginning of Chapter 2, Old Major has died in his sleep (early March). The animals continue to meet several nights a week to discuss Animalism and to prepare for an eventual rebellion, which they suppose will happen sometime during their lifetimes. The rebellion happens sooner than they think. In late June, the animals are growing restless because Farmer Jones has been drinking and neglecting them more than usual. Having been unfed for so long, the animals break into the store-shed to eat. Jones and his men try to stop the animals but are overwhelmed. The fight does not last long and the animals are stunned that the rebellion succeeds as spontaneously and as quickly as it does. The animals get rid of anything associated with man's domination of animals: reins, harnesses, etc. The rebellion becomes a historical fact when the animals change the name, Manor Farm, to Animal Farm. They also write the Seven Commandments of Animalism on the wall of the big barn.