He didn't "do" anything to accomplish that. The Soviet Union failed because communism doesn't work. Just like Reagan said, time and time again, they were doomed to fail. We spent like idiots for no damn reason. I have no problem with Star Wars, but everything else about our foreign policy during the Reagan years was a damn joke. Scandals, blunders, catastrophes, etc.
The Soviet Union was an expanding force at the end of the Carter years. It is difficult to imagine a scenario where the tired and defensive containment policy under the feckless leadership of a Carter, a Mondale, or a Kennedy would have succeeded just as well as Reagan's offensive approach ended up working.
Reagan addressed this in 1981 at Notre Dame:
The years ahead will be great ones for our country, for the cause of freedom and the spread of civilization. The West will not contain Communism; it will transcend Communism. We will not bother to denounce it, we'll dismiss it as a sad, bizarre chapter in human history whose last pages are even now being written.
This is what makes Reagan different than anyone from FDR to Carter. He didn't buy into a containment policy that allowed the Soviet Union to consolidate and expand its power. He played offense in both a military and a diplomatic sense.
Under Carter, nothing would have been done to give aid and comfort to Walesa and Solidarity in Poland. Reagan did that in concert with Pope John Paul II. That movement spread to the rest of Eastern Europe and it weakened the ability of the Soviet Union to expand its influence elsewhere.
There is a reason why there are statues dedicated to Ronald Reagan throughout Eastern Europe. He felt the Soviet Union could be defeated rather than contained and he worked to accomplish that goal.
Reagan Honored in Former Soviet Bloc Countries While Defaced in US « Mark America
We spent tremendously on defense programs because of the need to defeat the Soviets and to update a military that had been left to rot under Nixon, Ford, and Carter.
What did that spending buy? A peace dividend in the 1990s opening up the possibility to have balanced budgets and perhaps declining national debt as a result.
The fact that didn't happen isn't Reagan's fault. You can pin that one on the likes of H. Dubya, Clinton, Dubya and Obama and the mainstream politicians who refused to take a long-term view on the potential a declining defense budget offered the nation.
Beginning with FDR and continuing straight on through to Carter, we treated the Soviet Union as if it were a permanent fixture on the world stage. We didn't fight for freedom anywhere they were in power. We merely fought to prevent them from expanding their influence beyond the territories they or their allies already controlled.
Reagan was the game-changer. But I wouldn't expect someone who believes Jimmy Carter was a great President to get that. It doesn't fit with what Ron Paul has told him to believe.