The 19th century in Europe was the source for many new scientific thoughts and discoveries. Although it began in the 18th century, the First Industrial Revolution really took off in Britain sometime around 1820-1830. This started leading to modern advancements in the way people lived and helped improved commerce in capitalist societies in Europe. the new technologies meant higher and faster rates of outputs of resources and good which meant an overall growth in countries' wealth because of production.
However, increased technology and factory work settings meant harsh working conditions in the factories even if people could now earn wages. During the Second Industrial Revolution, as there were even more people were moving to the cities to take jobs, people lived in extremely poor conditions, often several families in one small apartment, and worked for little pay in terrible conditions.
This led to workers joining together and forming the first labor unions, which fought together for higher pay and better working conditions. At first these were highly resisted by companies and the government. For example: in England the government used common law, laws making something illegal without and actual law being written, were used to disband unions. Although it took a long time, these first labor unions ended up leading to many laws and protections for workers, including shorter work hours and safety laws to protect workers.
Marxism was also developed during the 19th century and became popular among the working class along with socialism. After years of harsh working conditions and companies earning much more money while workers received little, these workers turned to Marxism and socialism as a new, popular political ideology that supported greater support for the working class.