I genuinely want to know how someone could legally prevent a private citizen from running for public office. That’s anathema to the very idea of our country.
They can't be prevented from "running" (there is no "running for President" in the US Constitution).
But they can be prevented from holding office by Senate conviction on an impeachment: Article I, section 3: "Judgment in cases of impeachment shall not extend further than to removal from office, and disqualification to hold and enjoy any office of honor, trust or profit under the United States."