The humans serve two roles, in my mind, the first being the object of the animals' desire for freedom and to benefit from their own work. As Old Major said, the animals toil and give up the best years of their life and do not recieve the benefits of this work. So the humans are the enemy and serve that role well as the animals can drive them off the farm and gain their "freedom."
By the end of the book, the pigs and the humans have become so similar it is difficult to tell them apart. In this way, they also serve as the oppressors again but also to show that the pigs have completely changed and that Napoleon's revolutionary fervor was just a front to cover his desire to obtain the same power and privilege that the humans had in the beginning of the book.
This novel is roughly based on the Russian Revolution, which is a series of revolutions that took place in Russia in 1917. Each character in the novel represents one of that in the RR. For example: Napoleon can be based on Joseph Stalin as the Battle of the Cowshed can be based on the Russian Civil War. (Stalin was leader of the USSR, and created 'stalinism.') (you can search animal farm on wikipedia and look under characters, you will find who is who.)
When I was writting a report with this almost exact question I used the following websites.