Marx was raised by Jews who converted to Lutheranism for political reasons. Marx ultimately became an atheist who saw religion as a reflection of a flawed society.
Marx was the founder of communism. Politics to Marx was wrapped up in economics and social conditions.
Karl Marx was born and raised in Trier, a city that was then in the Kingdom of Prussia but now occupies southwestern Germany on the French border. He died of respiratory problems in London in 1883.
Marx came from a Jewish background, but his father converted to Lutheranism to avoid losing his work as a lawyer in anti-Semitic Prussia. His home was only Christian in name and largely non-religious. Marx, of course, became the atheist we all know.
It's not that Marx was antagonistic toward religion, he just saw it from a uniquely historical perspective. Everything to Marx was a matter of society which, in turn, was a reflection of economics. Oppression, poor economic conditions, fear and desperation caused humanity to cling to religion and Marx always hoped for a world where such comfort was unneeded. He said:
The abolition of religion as the illusory happiness of the people is the demand for their real happiness.
According to Marx, religion was an unnecessary social institution that, while comforting to mankind, only served to stupefy him in the end, hence perhaps his most famous quote:
Religion is the sigh of the oppressed creature, the heart of a heartless world, and the soul of soulless conditions. It is the opium of the people.
Economics, not politics
Politics to Marx, like religion, is a manifestation of economics and the material world. All of history and the governance of humanity was a struggle between the "bourgeoisie" and the "proletariat." In the beginning, people bartered and traded and lived in collective communities. Then, with farms came personal property. With currency came capitalism and the exploitation of workers for the profit of the property owners. Workers unjustly sold pieces of their lives (hours worked) for less than it was worth, creating surplus value which equates to profits for owners.
This horrible injustice was the basis for Marx's revolutionary philosophy. He called for real, violent action against owners and the political systems that supported them. He said things like:
The philosophers have only interpreted the world, in various ways: the point, however, is to change it.
Let the ruling classes tremble at a Communist revolution. The proletarians have nothing to lose but their chains. They have a world to win. Working men of all countries, unite!
What would come after the revolution, according to Marx, is a government, society, and economy ruled completely by the workers themselves. They would create an economic utopia where all labor was exchanged for equal value, where no-one and everyone owned all property, and humanity would reach its full potential as a single, cooperative unit.
It didn't really work out.
This is merely a bare outline of Marx's extensive political/economic/social philosophy. Suffice it to say, Marx had a profound effect on the world. He is at times considered the father of the social sciences and his economic philosophy is still considered a brilliant and insightful analysis of the human condition. His ideas sparked revolutions across the world from the multi-national Revolution of 1848 to the Soviet takeover of Russia to Mao Zedong in China to Castro in Cuba and countless other, mostly failed, attempts at forcibly installing communism.
Today, many still consider themselves Marxists all over the world, even though only China's communist-capitalist hybrid economy and Cuba hold on to the Marxist ideal on a national level. Still, the socialist governments of Europe and North America owe a large debt to his ideas, despite the regular vilification of this great thinker.