There is no simple response for this question. Most historians believe that the Cold War ended as a result of a series of Democtatic and Republican presidents who all stuck to the same basic policy of containment.
In the short term, one significant reason the Cold War ended was the economic instability of the Soviet Union. When Gorbachev became the Soviet premier, he instituted the policies of glasnost and perestroika (meaning openness and economic restructing) that began allowing for some freedoms within the Soviet Union in an effort to spur economic development. Many Soviets, however, believed that these restructuring efforts actually led to the downfall of the Soviet Union.
Reagan is often credited bringing about an end to the Cold War as a result of his willingness to openly communicate with the Soviet Union (as demonstrated by the series of conferences he and Gorbachev held), while also remaining steadfast at home with his insistance on investing in advanced military technology. The prime example of this was with the Strategic Defense Initiative (SDI), or "Star Wars Program". This was an imagined laser satellite defense system.
Finallly, a growing area of research focuses on the impact Pope John Paul II had on facilitating discussion between the two sides, as well as with his keen knowledge of resistance movements in Eastern Europe.