The wartime alliance between the United States and the Soviet Union was an aberration in the history of U.S.-Soviet relations, not the norm. It was an alliance of convenience between two countries at war with a common enemy.
The Cold War can be seen as having its origins with the 1917 Bolshevik Revolution. The new Russian government was founded in extreme opposition to the economic and political ideals and practices of the Western democracies. In an effort at impeding the ability of the Bolsheviks (or Communists) to consolidate their hold on power, the United States sent troops to the Russian ports of Archangel and Murmansk in the north, and to Vladivostok in the Far East. These troops were expected to support anti-Bolshevik parties and, when the country descended into Civil War, anti-Bolshevik military units. In practice, they served no real purpose other than to notify Bolshevik leaders like Lenin, Trotsky, Stalin and others that the Western powers would indeed oppose them.
The rise of Adoph Hitler and the National Socialist Party, the Nazis, in Germany, posed a potential threat to European peace and stability. The sense of imminent danger grew when the Soviet Union's dictator, Joseph Stalin, signed an agreement with Germany, the Hitler-Stalin Non-Aggression Pact of 1939. Under the terms of this pact, the two countries agreed not to attack each other, and to divide Poland into German and Soviet territories. The Soviet Union would also be given the Baltic countries of Lithuania, Latvia and Estonia -- countries that would forcibly remain part of the U.S.S.R. until the end of the Cold War.
The Hitler-Stalin Non-Aggression Pact ended with Germany's invasion of Russia in June 1941, an act that came very close to conquering Russia.
In the United States, President Franklin Roosevelt had been trying to move the American public towards acceptance of the probable inevitability of war in Europe. Following the German invasion of Russia, his administration began a program known as Lend-Lease, in which the United States began shipping military and humanitarian aid to Russian ports, always at the risk of patrolling German submarines. With the December 7, 1941, Japanese attack on U.S. naval forces at Pearl Harbor, Hawaii, and the German declaration of war on the United States, the U.S. was able to formalize a wartime alliance with a country that it would otherwise hold in disdain.
That the U.S.-Russian alliance did not survive the end of the war was the result of the extremely deep, contentious issues that divided them. These issues included the division of Europe into spheres of influence and Soviet support for communist movements in less-developed parts of the world. Stalin's rejection of participation in the U.S.-sponsored Marshall Plan for the rebuilding of Europe and his support of communist parties in Western Europe, especially in Italy, the Greek Civil War involving communist insurgents, and the Soviet-backed communist seizure of total power in Czechoslavakia all contributed to the resurgance of what became known as the Cold War. And, of course, tensions over the status of the city of Berlin would emerge as the most dangerous potential flashpoint in the Cold War until the Cuban Missile Crisis of October 1962.