Considered "the government's worst-kept secret", the Flesh was programmable matter often used in dangerous industrial work to create clone bodies operated by human "drivers". Thousands of lives were saved by Doppelgängers being killed in the place of the human operators.
The Flesh was able to self-replicate. This meant there was never a risk of work forces running out of it.
In the 22nd century, a solar tsunami caused a group of active Gangers to be separated from their human controllers. Rather than reverting to Flesh as programmed, the Gangers operated independently of the humans. They still had the memories of the humans they were based on. After failed peace attempts with the humans, the Gangers rebelled for the right to exist. The Flesh created a Ganger of the Doctor without human manipulation or assistance, using the sample it had taken from the Doctor's handprint and the psychic contact it had made with him.
The Flesh still existed in the 52nd century, when it was used by Madame Kovarian to create Gangers, of Amy Pond to fool herself and her family into thinking that she was not missing and then Melody Pond to secure her kidnapping. (TV: A Good Man Goes to War)
While humans acknowledged the Flesh was alive, they did not consider it a sentient or intelligent life form. They compared it to moss. Miranda Cleaves explained that the Flesh knew how to mimic life, but did not actually know how to be alive.
The Doctor, on the other hand, was not sure. When he scanned the Flesh with his sonic screwdriver, he was surprised to note it responded with a scan of its own. When he touched it, he noted he felt a consciousness in the flesh that investigated him curiously when he made contact. He told the others that the Flesh might have a consciousness of its own, but not one that humans could understand; each time they made clones it learned more about humans.
The Doctor eventually discovered through his and the other Gangers that the Flesh indeed had a sentience of its own that it was only just beginning to actualise. It was in great pain because it recalled the deaths of the Gangers born from it. This was evident during Ganger decommissioning when the Ganger's eyes would ask, "Why?" (TV: The Almost People)