They ate food and drinks to sustain their bodies and the thoughts and memories of other Mind Leaches to sustain their consciousnesses. Having their thoughts and memories eaten did no harm to the Mind Leaches. They could eat the thoughts and memories of other species, but doing so usually killed the person being fed on.
When the Master was imprisoned on Earth by UNIT in the 1970s, he used Time Lord technology to make a trap. A few years after he escaped, a Mind Leach was drawn into the trap, where it was kept in a stasis field. In 2016, the Master returned to the island prison and attempted to use the Mind Leach to restore his memory, luring in human scientists until he could provoke the Doctor into trying to investigate. He was stopped by the Sixth Doctor. (AUDIO: Vampire of the Mind)