Animal Farm is written as an allegory by which the the creation of the Soviet Union and the rise of Stalin is recreated through the guise of (what Orwell himself alludes to) a "fairy story." Thus, the Manor Farm (later renamed Animal Farm after the Rebellion) represents Russia with the Rebellion representing the Bolshevik Revolution, which resulted in the creation of the Soviet Union. Through this metaphor, Orwell discusses the abuses and betrayals of the Bolshevik elites and the rise of totalitarianism under Stalin.
This primary metaphor is supported by various subsidiary metaphors, most notably seen in the various characters within the book and the historical parallels they are meant to invoke. Some are more obvious than others. For example, Napoleon and Snowball represent Stalin and Trotsky respectively, with Napoleon's rise to power (with Snowball's expulsion) paralleling Stalin's own rise to power after Lenin's death. The pigs collectively, as the planners and organizers of the farm, stand in for the Communist Party elite. We can further observe parallels to the brutality of Stalinism in Napoleon's brutal dictatorship on the farm. In addition, one can point toward examples such as Boxer, the kindly workhorse, who represents the working class (only to be later betrayed by the pigs, sold off to be butchered when he has grown too feeble), or Moses, the raven, who represents the influence of the Church.
Finally, there are the humans themselves who represent the capitalists (remember, communism defines itself in opposition to capitalism), with the human owner Mr. Jones driven off of the farm, even as the neighboring farms remain. The role of humans-as-capitalists is one of the densest and most interesting metaphors, however, given the degree to which the pigs themselves take on anthropomorphic traits as the book continues, a theme that culminates in the book's ending, when the animals can no longer differentiate between the humans and the pigs. Thus, the humans represent both the presence of capitalism but also the corruption within the Communist Party itself and the disconnect between the Party leadership and the people of the Soviet Union.