Section 3 of the Fourteenth Amendment states:
No person shall be a Senator or Representative in Congress, or elector of President and Vice-President, or hold any office, civil or military, under the United States, or under any State, who, having previously taken an oath, as a member of Congress, or as an officer of the United States, or as a member of any State legislature, or as an executive or judicial officer of any State, to support the Constitution of the United States, shall have engaged in insurrection or rebellion against the same, or given aid or comfort to the enemies thereof. But Congress may by a vote of two-thirds of each House, remove such disability.
This was originally intended to bar former Confederates after the Civil War. Some have attempted to use this clause against candidates based on their public statements about the riot at the Capitol on January 6, 2021, or their having encouraged people to protest in the capital city on that date (but not to riot), or for having given tours of the Capitol as a form of constituent service to people they were unaware would later attack the building. These arguments have thus far been rejected.
Some people accused of taking part in the riot itself were state legislators or former military officers, to whom the disqualification clause would apply. There has yet to be any legal ruling on whether they would be disqualified.
The Congressional Research Service has written,
Determining who has engaged in either of the two disqualifying activities, that is, engaging in insurrection or rebellion or giving aid or comfort to an enemy, is likely to be a difficult task given the scarcity of precedents and lack of clear definitions.
Some states have particular crimes that disqualify someone for office. For example, a 1951 Washington state law disqualifies from holding or running from any office someone who has been convicted of certain “subversive activities” in the state of Washington, such as to
Commit, attempt to commit, or aid in the commission of any act intended to overthrow, destroy or alter, or to assist in the overthrow, destruction or alteration of, the constitutional form of the government of the United States, or of the state of Washington or any political subdivision of either of them, by revolution, force or violence
In a quick search, I was unable to find any precedent for this having ever been applied.
Several states have broader restrictions on felons’ eligibility for state offices.
Often, there are additional requirements for particular offices. For example, the Texas state Constitution requires all judges to be licensed to practice law, and convicted felons cannot be licensed to practice law in Texas.