The AK-47 was designed and produced by the Soviet Union and its satellite states and allies in massive numbers. As the USSR and its fellow Warsaw Pact nations were planned economies, unlike the capitalist economies of the West, there was no economic restriction on the weapon's production. Literally millions of AK weapons were produced in the 1960s both in the USSR and in its satellites. Unlike say, the USA, which only produced enough weapons to meet the demands of its market, primarily the US military and a small number of allies. For the Soviet Union, weapons such as the AK-47 (although also tanks, planes, bombs and all the other weapons of war) became a form of political currency. The designs of the weapon were readily provided to Soviet satellites and allies and finished weapons were provided to Eastern Bloc armies by the hundreds of thousands.
There are many reasons why the AK-47 and its variants were pushed so hard by the Soviet Union. In the late 40s and early 50s when it was first being developed, the "assault rifle" was a new concept in weaponry. The most common infantry weapon of World War II had been single-shot rifles such as the M1 Garand of the USA or the Mosin-Nagant of the USSR. The military philosophy behind such weapons emphasized the marksmanship and ability of individual soldiers. Actual military conflict in the Second World War, however, demonstrated the utility of machine gun fire when wielded by single, mobile soldiers using early submachineguns and assault rifles, such as the German StG 44 or the the American Thompson SMG. The AK-47 was designed not only to be a primary battlefield weapon of the Soviet Union and its allies, but also a symbol of the technological and engineering ability of the Soviets. It was as much a propaganda device as it was a weapon.
In all, tens of millions of AK-47s and its later variants and improvements were produced by the USSR and its allies throughout the course of the Cold War and afterwards. The low estimate of AK-type weapons in produced from its introduction until today is 35 million. The high estimates go over 100 million. By comparison, the American M-16/AR-15 and its variants only number some 11 million produced from its introduction in the 1960s until today.
The famous durability of the AK-47 also plays a role in this. Designed as simply as possible, the AK-47 was notorious for operating in difficult circumstances that would have fouled or destroyed other, "more technologically advanced" weapons. You can wrap an AK-47 in a tarp, bury it in the desert for 50 years, dig it up, clean it out, and still shoot it. Some of the weapons captured by US forces from the Taliban in Afghanistan during the mid-2000s had serial numbers tracing their manufacture back to the Soviet Union in the 1950s and 1960s. You can dunk an AK-47 into thick mud, pull it out, load it and fire it without even cleaning the mud out of the firing chamber. Very few other weapons can boast of this durability, and that means that the vast majority of AK-type weapons produced (and again, there could be anywhere from 35 to 100 million of them) are still in existence and usable.
Main source: "The Gun" by C.J. Chivers, 2010.