It's hard to see how the Cold War could have been avoided without either the Western democracies or the Soviet Union abandoning their core values and ideologies.
Joseph Stalin had demonstrated, through the manner he had ruled the U.S.S.R. before the outbreak of World War II, that his only concern was his absolute control over Soviet 'citizens' at home and Communists abroad. This was made crystal clear by his treatment of the nations of Eastern Europe that Soviet troops had invaded as they defeated the Axis powers. According to the agreements entered into with the Western Allies - Great Britain and the United States - these nations - Bulgaria, Czechoslovakia, Hungary, Poland, and Romania - were to hold free and fair elections to determine the nature of their Post-War governments. Even when such elections were actually held, the results were discarded when they failed to give the Communist party control over the nation. In all cases, regardless of the wishes of the peoples living in these nations, Communist governments were established, governments that were under the control of the Kremlin.
These circumstances remained the same under Stalin's successors, as demonstrated by the violent crushing of opposition to Communist rule in East Germany (1953), Hungary (1956), and Czechoslovakia (1968) at the direction of the Kremlin and with the assistance of Soviet troops.
Consistent with this demand for control, stemming from a deep sense of insecurity, the Soviets built and maintained an enormous offensive military force that could only be seen as a threat by the Western democracies. This was compounded by the Soviet involvement in conflicts in the developing world: Africa, Asia, Latin America, and the Middle East. In these regions the Soviets sought to and often succeeded in establishing surrogates.
In the 1980s the Cold War 'flared up' due to a combination of Soviet backed Communist revolution in Central America and the election of a belligerent, right wing president of the United States - Ronald Reagan. President Reagan heated up the Cold War by adopting a confrontational stance toward the Soviet Union, as reflected in the renewal of the arms race, a major expansion of the U.S. armed forces, and the deployment of medium range nuclear armed missiles in Europe.
The Cold War ended as it could only have ended - by one of the two competing superpowers coming to an end. To a large degree due to the Soviet Union's inability to compete in the renewed arms race, Premier Gorbachev sought to reform the U.S.S.R. with perestroika - the ending of a centrally controlled economy - and glasnot - a new political openness. These reforms fatally undermined the control of the Communist Party within the Soviet Union and Eastern Europe in general. After the fall of Communist governments in the nations of Eastern Europe and the withdrawal of Soviet troops from these countries, Communist rule in Russia itself ended in 1991.