Animal Farm is a type of story called an "allegory." In an allegory, the characters, settings, and events stand for something else.
In Animal Farm, the story elements represent the communist revolution in Russia in the early 1900’s. When the animals revolt and expel the farm owner, Mr. Jones, the writer is representing the Russian Revolution, which led to the ouster of Czar Nicholas. As the animals attempt to set up a fair and equal society, some of the animals represent actual historical figures (the pig Napoleon represents Stalin, Snowball represents Trotsky, Squealer represents the media, Boxer represents the working class, etc.)
As the years go by, instead of establishing an egalitarian society, the farm falls under the dictatorial power of one animal, the pig Napoleon. Just like Stalin in real life, Napoleon takes advantage of the “citizens” by depriving them of rights, threatening them, and in some cases killing them.
Eventually, the animals begin to act more and more like their oppressor, man. At the end, they actually begin to physically resemble man. Orwell (the author) is trying to show that the oppressed can become the oppressors, if they have unlimited power.
The interesting thing is that Orwell actually supported communism, he was just trying to show that Russia did a lousy job of implementing it.