Class in Realism
Class is a huge deal in Realist literature. Sometimes Realist writers will delve into the intricate etiquette of the upper classes, and sometimes they'll focus on the trials and tribulations of the lower classes.
But the class that Realism is most concerned with, at least in Western Europe, is the middle class. Now, it's important to remember that the middle class didn't always exist. Way back in the day, there was the aristocracy (all of those rich landowners with powdered faces and fancy wigs) and there was everyone else (peasants, mostly, who worked their butts off on land owned by the aristocracy).
Well, in the 19th century, the middle class began to rise. Thanks to industrialization and the rise of capitalism, a peasant could, over a little time, become a wealthy merchant and start living a little more comfortably. Society was changing, social structures and classes were being transformed, and Realism reflected these changes.
The rise of the middle class also meant that there was a rise in literacy. Suddenly, the audience for literature expanded: it wasn't just rich people who had the time and the ability to read—now the middle class could, too. It's no surprise, then, that Realist literature often reflected the concerns of the middle class.
Realism's emphasis on class, and on society in general, is a departure from the concerns of the literary movement that preceded Realism: Romanticism. In fact, Realism was partly a reaction against Romanticism. While the Romantics liked to write, for example, about solitary individuals independent from society, Realists chose to focus on social networks and the individual's place within these social networks.
Chew on This
Here is Leo Tolstoy delving into the nuances of class etiquette in Anna Karenina.
Charles Dickens's hero Pip is intent on making his way up the British class system, as you can see in these quotations from Great Expectations.