How did Lenin and the Bolshevik party change the ideals of Marxism to fit the needs of Russian society?
Marx had argued that a class revolution would most likely be effected by an industrial proletariat. The problem in Russia was that it was not largely urban, and while it was industrializing, lacked the kind of tightly-knit, class-conscious proletariat Marx had in mind. It also had an enormous peasant class, people Marx had sneeringly characterized as "sacks of potatoes" due to their unwillingness to make common cause with urban workers.
Lenin, recognizing this fact, advocated that the revolution should be led by a small group of intelligentsia, a party that would seize control of government, or overthrow it altogether, and give power to working people as represented by the soviets. This was the guiding principle of his revolutionary party, the Bolsheviks. Revolution would have to come from above. As Lenin said before the revolution and civil war, "If socialism can only be realized when the intellectual development of all the people permits it, then we shall not see socialism for another 500 years."
Once in power, Lenin, reacting to pressure from the conservative peasants, especially land owning kulaks, instituted a series of market reforms that would have horrified Marx. This so-called New Economic Policy (NEP) allowed for private land ownership and sale of produce on something approaching a free market. Lenin also openly courted foreign capitalist investment, another flagrant violation of Marxist orthodoxy, but one that seemed necessary under the circumstances. Stalin would make the same decision.
But there is an answer. Communists wanted to abandon the war. All other party wanted to go on. Later all remained other party was supported by foreigners.
Russian people hated war, and did not wanted foreigner forces on russian land. And there were five years of civil war. And communists had luck.
Historians have to understand that events were not inevitabe. We just have the possibility to see their future. They did not have.