Gorbachev's reforms, the weak economy of the USSR and the Satellite States breaking away from the USSR, US-Soviet diplomacy, and various treaties were signed that limited arms. These were all factors that ended the cold war. The main factor I would say would be economics.
I hope this helps you! :)