The AK-47 is inspired by, but not a direct copy of, the StG 44.
Agmen covered most of the points, but i will elaborate on one of them:
Quote:it fit into something that the Soviet era thought.
Cheap, able to be mass produced, and you didn't have to be trained (well) to use the thing - simply pray and spray.
The design competition, for which the AK was submitted to for testing, had the sole purpose of replacing the PPSh-41 and PPS-43 sub-machine guns that, at the time, made up a large portion of the soviet arsenal.
as to the internal mechanics,
the AK drew from previous rifle technology innovations:
he trigger mechanism, double locking lugs and unlocking raceway of the M1 Garand/M1 carbine,
the safety mechanism of the John Browning designed Remington Model 8 rifle,
and the gas system of the StG 44.
Kalashnikov and his design team had access to all of these weapons. He also observed: "A lot of Russian Army soldiers ask me how one can become a constructor, and how new weaponry is designed. These are very difficult questions. Each designer seems to have his own paths, his own successes and failures. But one thing is clear: before attempting to create something new, it is vital to have a good appreciation of everything that already exists in this field. I myself have had many experiences confirming this to be so."