How is Animal Farm an allegory for the Russian Revolution?
The plot and major events in the book parallel the Russian Revolution directly. For example, the Battle of the Cowshed represents the Russian Civil War and its battles with occupying Germany, in which Leon Trotsky proved to be an able stratagist, and the expulsion of Snowball represents Trotsky's eventual expulsion by Stalin. Most of the named characters represent figures in the revolution: Old Major is Karl Marx, Napoleon is Stalin, the dogs are Stalin's Secret Police, and Squealer is Stalin's propaganda. The movement of the farm from a Marxist Utopia to a dictatorship parallels Stalin's accumulation of power and the brutality and lies he used to control his people.
...a society of animals set free from hunger and the whip, all equal, each working according to his capacity, the strong protecting the weak... Instead — she did not know why — they had come to a time when no one dared speak his mind, when fierce, growling dogs roamed everywhere, and when you had to watch your comrades torn to pieces after confessing to shocking crimes.
(Orwell, Animal Farm, msxnet.org)
Orwell did not intend to provide a subtle message with Animal Farm; it is a strict and deliberate condemnation of Marxist ideology, but without an explicit alternative. Orwell tended to be pessimistic about social ideals and believed that most social systems would lead to abuse and fraud eventually. In this case, he showed how the Russian Revolution and the actions of Stalin would lead to a worse system than even the Czars. Animal Farm exemplifies the inevitable decline of Marxist-based societies.
In a broad sense, this is true, but many of the details differ. For one thing, Animal Farm covers the development of revolutionary theory among the animals, the overthrow of their former government, and the initial establishment of a revolutionary state. All these events correspond with things that happened before the rise of Stalin to supreme power, during the nineteenth century rise of the European left and the decade after the Russian Revolution (Old Major, for instance, is clearly intended to be the Animal Farm counterpart to Karl Marx). For another, the pigs make somewhat more blatant compromises with the humans by the end of the story than Stalin ever did with the West. They cease all attempts to spread their revolution -- Stalin certainly never went that far -- and they even remove the symbols of the animals' cause from their flag, which would correspond to the removal of the hammer and sickle from the Soviet flag, something that was never done under Stalin. These minor differences seem mainly to reflect Orwell's pessimism over the course of events at the end of the Second World War, his twin fears that the Soviet state was no longer progressive or revolutionary in any sense, and that it would thus closely cooordinate its repressive activities with the West. The first of these realizations was accurate, the second less so, at least in Stalin's time.