Ronald Reagan took office under a pledge to repudiate the principle of detente that had guided Cold War doctrine since the mid-sixties. Rather, he thought the United States should actively try to defeat the Soviet Union, which he portrayed as an "evil empire." As such, he engineered a massive military buildup, including stockpiling nuclear weapons, and through the Reagan Doctrine he diverted billions to proxies fighting communist forces around the world, most conspicuously the mujahedeen in Afghanistan. All of this was a deliberate plan to destablize the Soviet Union through the economic pressure of keeping up with US military spending, and to actively push communism back through supporting anti-communist leaders.
At the same time, however, Reagan shied away from brinkmanship, and as his presidency wore on, he came to believe in dialogue with the Soviets as a way to scale down the conflict. While he was publicly beseeching Mikhail Gorbachev to "tear down" the Berlin Wall and spending billions on the Strategic Defense Initiative that would undo the strategic balance upon which detente was partially based, he also was reaching out to the Soviet premier, who he came to trust. In fact, it was Gorbachev's rise to the head of the USSR that perhaps most altered the dynamic of the Cold War. His desire to effect domestic reforms in the USSR depended on establishing better relations with the United States, and he repeatedly agreed to arms limitations treaties. He also cut back foreign aid to communist fighters in the so-called Third World as well as ending the destructive and bloody conflict in Afghanistan. Reagan, heavily influenced by his Secretary of State George Shultz, recognized these overtures for what they were, and responded by himself agreeing to major cutbacks in the US nuclear arsenal, an action that helped lead to warmer relations heading into the George H.W. Bush presidency.