What is meant by selling food for charity is that some people prepare food of whatever type at home, then they sell it and they donate the money raised to a charitable project or give it in charity.
This is a good deed and a kind of charity, and cooperating in charity, for which a person earns reward as do all those who participate in it, whether they contribute money or efforts, etc. All of that is included in the words of Allaah (interpretation of the meaning):
“Help you one another in Al‑Birr and At‑Taqwa (virtue, righteousness and piety)”
But we should note that the buying and selling should be done outside the mosque itself, because it is haraam to buy and sell inside the mosque. The Prophet (peace and blessings of Allaah be upon him) said: “If you see anyone buying and selling inside the mosque, say, ‘May Allaah not cause your trade to be profitable.’” Narrated by al-Tirmidhi, 1321; classed as saheeh by al-Albaani in Saheeh al-Tirmidhi, 1066
And Allaah knows best.